libcloud.dns.drivers package

Submodules

libcloud.dns.drivers.auroradns module

AuroraDNS DNS Driver

class libcloud.dns.drivers.auroradns.AuroraDNSConnection(user_id, key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]

Bases: ConnectionUserAndKey

Initialize user_id and key; set secure to an int based on passed value.

calculate_auth_signature(secret_key, method, url, timestamp)[source]
gen_auth_header(api_key, secret_key, method, url, timestamp)[source]
host: str = 'api.auroradns.eu'
request(action, params=None, data='', headers=None, method='GET')[source]

Request a given action.

Basically a wrapper around the connection object’s request that does some helpful pre-processing.

Parameters:
  • action (str) – A path. This can include arguments. If included, any extra parameters are appended to the existing ones.

  • params (dict) – Optional mapping of additional parameters to send. If None, leave as an empty dict.

  • data (unicode) – A body of data to send with the request.

  • headers (dict) – Extra headers to add to the request None, leave as an empty dict.

  • method (str) – An HTTP method such as “GET” or “POST”.

  • raw (bool) – True to perform a “raw” request aka only send the headers and use the rawResponseCls class. This is used with storage API when uploading a file.

  • stream (bool) – True to return an iterator in Response.iter_content and allow streaming of the response data (for downloading large files)

  • retry_failed – True if failed requests should be retried. This argument can override module level constant and environment variable value on per-request basis.

Returns:

An Response instance.

Return type:

Response instance

responseCls

alias of AuroraDNSResponse

class libcloud.dns.drivers.auroradns.AuroraDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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

HEALTHCHECK_TYPE_MAP = {'HTTP': 'HTTP', 'HTTPS': 'HTTPS', 'TCP': 'TCP'}
RECORD_TYPE_MAP: Dict[RecordType, str] = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'DS': 'DS', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT'}
connectionCls

alias of AuroraDNSConnection

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 (master / slave).

  • 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_healthcheck(zone, type, hostname, port, path, interval, threshold, ipaddress=None, enabled=True, extra=None)[source]

Create a new Health Check in a zone

Parameters:
  • zone (Zone) – Zone in which the health check should be created

  • type (AuroraDNSHealthCheckType) – The type of health check to be created

  • hostname (str) – The hostname of the target to monitor

  • port (int) – The port of the target to monitor. E.g. 80 for HTTP

  • path (str) – The path of the target to monitor. Only used by HTTP at this moment. Usually this is simple /.

  • interval (int) – The interval of checks. 10, 30 or 60 seconds.

  • threshold (int) – The threshold of failures before the healthcheck is marked as failed.

  • ipaddress (str) – (optional) The IP Address of the target to monitor. You can pass a empty string if this is not required.

  • enabled (bool) – (optional) If this healthcheck is enabled to run

  • extra (dict) – (optional) Extra attributes (driver specific).

Returns:

AuroraDNSHealthCheck

ex_delete_healthcheck(healthcheck)[source]

Remove an existing Health Check

Parameters:

zone (AuroraDNSHealthCheck) – The healthcheck which has to be removed

ex_get_healthcheck(zone, health_check_id)[source]

Get a single Health Check from a zone

Parameters:
  • zone (Zone) – Zone in which the health check is

  • health_check_id (str) – ID of the required health check

Returns:

AuroraDNSHealthCheck

ex_list_healthchecks(zone)[source]

List all Health Checks in a zone.

Parameters:

zone (Zone) – Zone to list health checks for.

Returns:

list of AuroraDNSHealthCheck

ex_update_healthcheck(healthcheck, type=None, hostname=None, ipaddress=None, port=None, path=None, interval=None, threshold=None, enabled=None, extra=None)[source]

Update an existing Health Check

Parameters:
  • zone (AuroraDNSHealthCheck) – The healthcheck which has to be updated

  • type (AuroraDNSHealthCheckType) – (optional) The type of health check to be created

  • hostname (str) – (optional) The hostname of the target to monitor

  • ipaddress (str) – (optional) The IP Address of the target to monitor. You can pass a empty string if this is not required.

  • port (int) – (optional) The port of the target to monitor. E.g. 80 for HTTP

  • path (str) – (optional) The path of the target to monitor. Only used by HTTP at this moment. Usually just ‘/’.

  • interval (int) – (optional) The interval of checks. 10, 30 or 60 seconds.

  • threshold (int) – (optional) The threshold of failures before the healthcheck is marked as failed.

  • enabled (bool) – (optional) If this healthcheck is enabled to run

  • extra (dict) – (optional) Extra attributes (driver specific).

Returns:

AuroraDNSHealthCheck

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)[source]

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()[source]

Return a generator to iterate over available zones.

Return type:

generator of Zone

list_record_types()[source]

Return a list of RecordType objects supported by the provider.

Returns:

list of RecordType

name: str = 'AuroraDNS'
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

website: str = 'https://www.pcextreme.nl/en/aurora/dns'
class libcloud.dns.drivers.auroradns.AuroraDNSHealthCheck(id, type, hostname, ipaddress, port, interval, path, threshold, health, enabled, zone, driver, extra=None)[source]

Bases: object

AuroraDNS Healthcheck resource.

Parameters:
  • id (str) – Healthcheck id

  • hostname (str) – Hostname or FQDN of the target

  • ipaddress (str) – IPv4 or IPv6 address of the target

  • port (int) – The port on the target to monitor

  • interval (int) – The interval of the health check

  • path (str) – The path to monitor on the target

  • threshold (int) – The threshold of before marking a check as failed

  • health (bool) – The current health of the health check

  • enabled (bool) – If the health check is currently enabled

  • zone (Zone) – Zone instance.

  • driver (DNSDriver) – DNSDriver instance.

  • extra (dict) – (optional) Extra attributes (driver specific).

delete()[source]
update(type=None, hostname=None, ipaddress=None, port=None, interval=None, path=None, threshold=None, enabled=None, extra=None)[source]
class libcloud.dns.drivers.auroradns.AuroraDNSHealthCheckType[source]

Bases: object

Healthcheck type.

HTTP = 'HTTP'
HTTPS = 'HTTPS'
TCP = 'TCP'
class libcloud.dns.drivers.auroradns.AuroraDNSResponse(response, connection)[source]

Bases: JsonResponse

Parameters:
  • response (httplib.HTTPResponse) – HTTP response object. (optional)

  • connection (Connection) – Parent connection object.

parse_error()[source]

Parse the error messages.

Override in a provider’s subclass.

Returns:

Parsed error.

Return type:

str

success()[source]

Determine if our request was successful.

The meaning of this can be arbitrary; did we receive OK status? Did the node get created? Were we authenticated?

Return type:

bool

Returns:

True or False

exception libcloud.dns.drivers.auroradns.HealthCheckDoesNotExistError(value, driver, health_check_id)[source]

Bases: HealthCheckError

error_type = 'HealthCheckDoesNotExistError'
exception libcloud.dns.drivers.auroradns.HealthCheckError(value, driver, health_check_id)[source]

Bases: LibcloudError

error_type = 'HealthCheckError'

libcloud.dns.drivers.buddyns module

BuddyNS DNS Driver

class libcloud.dns.drivers.buddyns.BuddyNSDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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

connectionCls

alias of BuddyNSDNSConnection

create_zone(domain, type='master', ttl=None, extra=None)[source]
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 used through the extra param)

  • extra – Extra attributes that are specific to the driver

such as ttl. :type extra: dict

Return type:

Zone

Do not forget to pass the master in extra, extra = {‘master’:’65.55.37.62’} for example.

delete_zone(zone)[source]
Parameters:

zone (Zone) – Zone to be deleted.

Returns:

Boolean

get_zone(zone_id)[source]
Parameters:

zone_id – Zone domain name (e.g. example.com)

Returns:

Zone

list_zones()[source]

Return a list of zones.

Returns:

list of Zone

name: str = 'BuddyNS DNS'
type = 'buddyns'
website: str = 'https://www.buddyns.com'

libcloud.dns.drivers.cloudflare module

class libcloud.dns.drivers.cloudflare.CloudFlareDNSDriver(key, secret=None, secure=True, host=None, port=None, **kwargs)[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

MEMBERSHIPS_PAGE_SIZE = 50
RECORDS_PAGE_SIZE = 100
RECORD_TYPE_MAP: Dict[RecordType, str] = {'A': 'A', 'AAAA': 'AAAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT', 'URL': 'LOC'}
ZONES_PAGE_SIZE = 50
connectionCls

alias of GlobalAPIKeyDNSConnection

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

@inherits: DNSDriver.create_record

Note that for extra record properties, only the ones specified in RECORD_CREATE_ATTRIBUTES can be set at creation time. Any non-settable properties are ignored.

NOTE: For CAA RecordType, data needs to be in the following format: <flags> <tag> <ca domain name> where the tag can be issue, issuewild or iodef.

For example: 0 issue test.caa.com

NOTE: For SSHFP RecordType, data need to be in the format: <algorithm> <type> <fingerprint>

create_zone(domain, type='master', ttl=None, extra=None)[source]

@inherits: DNSDriver.create_zone

Note that for users who have more than one account membership, the id of the account in which to create the zone must be specified via the extra key account.

Note that for extra zone properties, only the ones specified in ZONE_CREATE_ATTRIBUTES can be set at creation time. Additionally, setting the ``ttl` property is not supported.

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_blacklist_ip(zone, ip)[source]
ex_disable_development_mode(zone)[source]
ex_disable_ipv6_support(zone)[source]
ex_enable_development_mode(zone)[source]
ex_enable_ipv6_support(zone)[source]
ex_get_ip_threat_score(ip)[source]
ex_get_user_account_memberships()[source]
ex_get_zone_settings(zone)[source]
ex_get_zone_stats(zone, interval=30)[source]
ex_purge_cached_file(zone, url)[source]
ex_purge_cached_files(zone)[source]
ex_set_zone_cache_level(zone, level)[source]
ex_set_zone_security_level(zone, level)[source]
ex_unlist_ip(zone, ip)[source]
ex_whitelist_ip(zone, ip)[source]
ex_zone_check(zones)[source]
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)[source]

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()[source]

Return a generator to iterate over available zones.

Return type:

generator of Zone

name: str = 'CloudFlare DNS'
type = 'cloudflare'
update_record(record, name=None, type=None, data=None, extra=None)[source]

@inherits: DNSDriver.update_record

Note that for extra record properties, only the ones specified in RECORD_UPDATE_ATTRIBUTES can be updated. Any non-updatable properties are ignored.

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

@inherits: DNSDriver.update_zone

Note that the zone, type and ttl properties can’t be updated. The only updatable properties are the extra zone properties specified in ZONE_UPDATE_ATTRIBUTES. Only one property may be updated at a time. Any non-updatable properties are ignored.

website: str = 'https://www.cloudflare.com'

libcloud.dns.drivers.digitalocean module

Digital Ocean DNS Driver

class libcloud.dns.drivers.digitalocean.DigitalOceanDNSDriver(key, secret=None, api_version='v2', **kwargs)[source]

Bases: DigitalOcean_v2_BaseDriver, DNSDriver

Parameters:
  • key (str) – API key or username to be 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.

  • api_version (str) – Optional API version. Only used by drivers which support multiple API versions.

  • region (str) – Optional driver region. Only used by drivers which support multiple regions.

Return type:

None

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

alias of DigitalOcean_v2_Connection

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 for MX and SRV. (Depends on record) {“priority” : 0, “port” : 443, “weight” : 100}

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 (master / slave) (does nothing).

  • ttl (int) – TTL for new records. (does nothing)

  • extra (dict) – Extra attributes (to set ip). (optional) Note: This can be used to set the default A record with {“ip” : “IP.AD.DR.ESS”} otherwise 127.0.0.1 is used

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

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 = 'DigitalOcean'
type = 'digitalocean'
update_record(record, name=None, type=None, data=None, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.

  • name (str) – Record name without the domain name (e.g. www). (Ignored) Note: The value is pulled from the record being updated

  • type (RecordType) – DNS record type (A, AAAA, …). (Ignored) Note: Updating records does not support changing type so this value is ignored

  • data (str) – Data for the record (depends on the record type).

  • extra (dict) – (optional) Extra attributes (driver specific).

Return type:

Record

website: str = 'https://www.digitalocean.com'

libcloud.dns.drivers.dnsimple module

DNSimple DNS Driver

class libcloud.dns.drivers.dnsimple.DNSimpleDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'HINFO': 'HINFO', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'POOL': 'POOL', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TXT': 'TXT', 'URL': 'URL'}
connectionCls

alias of DNSimpleDNSConnection

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. (This is not really used)

  • extra (dict) – Extra attributes (driver specific). (optional)

Return type:

Zone

For more info, please see: http://developer.dnsimple.com/v1/domains/

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

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 = 'DNSimple'
type = 'dnsimple'
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

website: str = 'https://dnsimple.com/'

libcloud.dns.drivers.dnspod module

class libcloud.dns.drivers.dnspod.DNSPodDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of DNSPodDNSConnection

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]
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 used through the extra param)

  • extra – Extra attributes that are specific to the driver

such as ttl. :type extra: dict

Return type:

Zone

delete_record(record)[source]

Delete a record.

Parameters:

record (Record) – Record to delete.

Return type:

bool

delete_zone(zone)[source]
Parameters:

zone (Zone) – Zone to be deleted.

Returns:

Boolean

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]
Parameters:

zone_id – Zone domain name (e.g. example.com)

Returns:

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 = 'DNSPod'
type = 'dnspod'
website: str = 'https://dnspod.com'

libcloud.dns.drivers.dummy module

class libcloud.dns.drivers.dummy.DummyDNSDriver(api_key, api_secret)[source]

Bases: DNSDriver

Dummy DNS driver.

>>> from libcloud.dns.drivers.dummy import DummyDNSDriver
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.name
'Dummy DNS Provider'
Parameters:
  • api_key (str) – API key or username to used (required)

  • api_secret (str) – Secret password to be used (required)

Return type:

None

create_record(name, zone, type, data, extra=None)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
>>> record 
<Record: zone=apache.org, name=libcloud, type=A, data=127.0.0.1...>
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
... 
Traceback (most recent call last):
RecordAlreadyExistsError:

@inherits: DNSDriver.create_record

create_zone(domain, type='master', ttl=None, extra=None)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> zone
<Zone: domain=apache.org, ttl=100, provider=Dummy DNS Provider ...>
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
... 
Traceback (most recent call last):
ZoneAlreadyExistsError:

@inherits: DNSDriver.create_zone

delete_record(record)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
>>> driver.delete_record(record)
True
>>> driver.delete_record(record) 
Traceback (most recent call last):
RecordDoesNotExistError:

@inherits: DNSDriver.delete_record

delete_zone(zone)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> driver.delete_zone(zone)
True
>>> driver.delete_zone(zone) 
Traceback (most recent call last):
ZoneDoesNotExistError:

@inherits: DNSDriver.delete_zone

get_record(zone_id, record_id)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.get_record(zone_id='doesnotexist', record_id='exists')
... 
Traceback (most recent call last):
ZoneDoesNotExistError:

@inherits: DNSDriver.get_record

get_zone(zone_id)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.get_zone(zone_id='foobar')
... 
Traceback (most recent call last):
ZoneDoesNotExistError:

@inherits: DNSDriver.get_zone

list_record_types()[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.list_record_types()
['A']

@inherits: DNSDriver.list_record_types

list_records(zone)[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> zone = driver.create_zone(domain='apache.org', type='master',
...                           ttl=100)
>>> list(zone.list_records())
[]
>>> record = driver.create_record(name='libcloud', zone=zone,
...                               type=RecordType.A, data='127.0.0.1')
>>> list(zone.list_records()) 
[<Record: zone=apache.org, name=libcloud, type=A...>]
list_zones()[source]
>>> driver = DummyDNSDriver('key', 'secret')
>>> driver.list_zones()
[]

@inherits: DNSDriver.list_zones

name: str = 'Dummy DNS Provider'
website: str = 'http://example.com'

libcloud.dns.drivers.durabledns module

DurableDNS Driver

class libcloud.dns.drivers.durabledns.DurableDNSConnection(user_id, key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]

Bases: DurableConnection

Initialize user_id and key; set secure to an int based on passed value.

responseCls

alias of DurableDNSResponse

class libcloud.dns.drivers.durabledns.DurableDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'HINFO': 'HINFO', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'RP': 'RP', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of DurableDNSConnection

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 (e.g. ‘aux’, ‘ttl’). (optional)

Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • domain (str) – Name of zone, followed by a dot (.) (e.g. example.com.)

  • type (str) – Zone type (Only master available). (optional)

  • ttl (int) – TTL for new records. (optional)

  • extra (dict) –

    Extra attributes (‘mbox’, ‘ns’, ‘minimum’, ‘refresh’,

    ’expire’, ‘update_acl’, ‘xfer’).

    (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

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 = 'DurableDNS'
type = 'durabledns'
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) – Name of zone, followed by a dot (.) (e.g. example.com.)

  • type (str) – Zone type (master / slave).

  • ttl (int) – TTL for new records. (optional)

  • extra (dict) – Extra attributes (‘ns’, ‘mbox’, ‘refresh’, ‘retry’, ‘expire’, ‘minimum’, ‘xfer’, ‘update_acl’). (optional)

Return type:

Zone

website: str = 'https://durabledns.com'
class libcloud.dns.drivers.durabledns.DurableDNSResponse(response, connection)[source]

Bases: DurableResponse

Parameters:
  • response (httplib.HTTPResponse) – HTTP response object. (optional)

  • connection (Connection) – Parent connection object.

libcloud.dns.drivers.gandi module

class libcloud.dns.drivers.gandi.GandiDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[source]

Bases: BaseGandiDriver, DNSDriver

API reference can be found at:

http://doc.rpc.gandi.net/domain/reference.html

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', 'CNAME': 'CNAME', 'LOC': 'LOC', 'MX': 'MX', 'NS': 'NS', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT', 'WKS': 'WKS'}
connectionCls

alias of GandiDNSConnection

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 (master / slave).

  • 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

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 = 'Gandi DNS'
type = 'gandi'
update_record(record, name, type, data, extra)[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=None, type=None, 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 (master / slave).

  • ttl (int) – TTL for new records. (optional)

  • extra (dict) – Extra attributes (driver specific). (optional)

Return type:

Zone

website: str = 'http://www.gandi.net/domain'

libcloud.dns.drivers.gandi_live module

class libcloud.dns.drivers.gandi_live.GandiLiveDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[source]

Bases: BaseGandiLiveDriver, DNSDriver

API reference can be found at:

https://doc.livedns.gandi.net/

Please note that the Libcloud paradigm of one zone per domain does not match exactly with Gandi LiveDNS. For Gandi, a “zone” can apply to multiple domains. This driver behaves as if the domain is a zone, but be warned that modifying a domain means modifying the zone. Iif you have a zone associated with mutiple domains, all of those domains will be modified as well.

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', 'CAA': 'CAA', 'CNAME': 'CNAME', 'DNAME': 'DNAME', 'DS': 'DS', 'KEY': 'KEY', 'LOC': 'LOC', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT', 'WKS': 'WKS'}
connectionCls

alias of GandiLiveDNSConnection

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 (master / slave).

  • 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

ex_create_multi_value_record(name, zone, type, data, extra=None)[source]
ex_delete_gandi_zone(zone_uuid)[source]
ex_switch_domain_gandi_zone(domain, zone_uuid)[source]
ex_update_gandi_zone_name(zone_uuid, name)[source]
export_zone_to_bind_format(zone)[source]

Export Zone object to the BIND compatible format.

Parameters:

zone (Zone) – Zone to export.

Returns:

Zone data in BIND compatible format.

Return type:

str

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 = 'Gandi LiveDNS'
type = 'gandi'
update_record(record, name, type, data, extra)[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

website: str = 'http://www.gandi.net/domain'

libcloud.dns.drivers.godaddy module

class libcloud.dns.drivers.godaddy.GoDaddyDNSDriver(shopper_id, key, secret, secure=True, host=None, port=None)[source]

Bases: DNSDriver

A driver for GoDaddy DNS.

This is for customers of GoDaddy who wish to purchase, update existing domains and manage records for DNS zones owned by GoDaddy NS servers.

Instantiate a new GoDaddyDNSDriver

Parameters:
  • shopper_id (str) – Your customer ID or shopper ID with GoDaddy

  • key (str) – Your access key from developer.godaddy.com

  • secret (str) – Your access key secret

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

alias of GoDaddyDNSConnection

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

delete_zone(zone)[source]

Delete a zone.

Note: This will CANCEL a purchased domain

Parameters:

zone (Zone) – Zone to delete.

Return type:

bool

ex_check_availability(domain, for_transfer=False)[source]

Check the availability of the domain

Parameters:
  • domain (str) – the domain name e.g. wazzlewobbleflooble.com

  • for_transfer (bool) – Check if domain is available for transfer

Return type:

list of GoDaddyAvailability

ex_get_agreements(tld, privacy=True)[source]

Get the legal agreements for a tld Use this in conjunction with ex_purchase_domain

Parameters:

tld (str) – The top level domain e.g com, eu, uk

Return type:

dict the JSON Schema

ex_get_purchase_schema(tld)[source]

Get the schema that needs completing to purchase a new domain Use this in conjunction with ex_purchase_domain

Parameters:

tld (str) – The top level domain e.g com, eu, uk

Return type:

dict the JSON Schema

ex_list_tlds()[source]

List available TLDs for sale

Return type:

list of GoDaddyTLD

ex_purchase_domain(purchase_request)[source]

Purchase a domain with GoDaddy

Parameters:

purchase_request (dict) – The completed document from ex_get_purchase_schema

Return type:

GoDaddyDomainPurchaseResponse Your order

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]

Get a zone (by domain)

Parameters:

zone_id (str) – The domain, not the ID

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 (purchased domains)

Returns:

list of Zone

name: str = 'GoDaddy DNS'
type = 'godaddy'
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

website: str = 'https://www.godaddy.com/'

libcloud.dns.drivers.google module

class libcloud.dns.drivers.google.GoogleDNSDriver(user_id, key, project=None, auth_type=None, scopes=None, **kwargs)[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', 'CAA': 'CAA', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of GoogleDNSConnection

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

Create a new record.

Parameters:
  • name (str) – Record name fully qualified, with a ‘.’ at the end.

  • 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. (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.) with a ‘.’ at the end.

  • type (str) – Zone type (master is the only one supported).

  • ttl (int) – TTL for new records. (unused)

  • 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_bulk_record_changes(zone, records)[source]

Bulk add and delete records.

Parameters:
  • zone (Zone) – Zone where the requested record changes are done.

  • records – Dictionary of additions list or deletions list, or both

of resourceRecordSets. For example:
{‘additions’: [{‘rrdatas’: [‘127.0.0.1’],

‘kind’: ‘dns#resourceRecordSet’, ‘type’: ‘A’, ‘name’: ‘www.example.com.’, ‘ttl’: ‘300’}],

‘deletions’: [{‘rrdatas’: [‘127.0.0.1’],

‘kind’: ‘dns#resourceRecordSet’, ‘type’: ‘A’, ‘name’: ‘www2.example.com.’, ‘ttl’: ‘300’}]}

Returns:

A dictionary of Record additions and deletions.

Return type:

dict of additions and deletions of Record

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)[source]

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()[source]

Return a generator to iterate over available zones.

Return type:

generator of Zone

name: str = 'Google DNS'
type = 'google'
website: str = 'https://cloud.google.com/'

libcloud.dns.drivers.hostvirtual module

class libcloud.dns.drivers.hostvirtual.HostVirtualDNSDriver(key, secure=True, host=None, port=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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of HostVirtualDNSConnection

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='NATIVE', ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • 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

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

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 = 'Host Virtual DNS'
type = 'hostvirtual'
update_record(record, name=None, type=None, data=None, 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=None, type=None, 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 (master / slave).

  • ttl (int) – TTL for new records. (optional)

  • extra (dict) – Extra attributes (driver specific). (optional)

Return type:

Zone

website: str = 'https://www.hostvirtual.com/'

libcloud.dns.drivers.linode module

class libcloud.dns.drivers.linode.LinodeDNSDriver(key, secret=None, secure=True, host=None, port=None, api_version='4.0', **kwargs)[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

name: str = 'Linode DNS'
type = 'linode'
website: str = 'http://www.linode.com/'

libcloud.dns.drivers.liquidweb module

Liquid Web DNS Driver

class libcloud.dns.drivers.liquidweb.LiquidWebDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of LiquidWebDNSConnection

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

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 = 'Liquidweb DNS'
type = 'liquidweb'
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

website: str = 'https://www.liquidweb.com'

libcloud.dns.drivers.luadns module

class libcloud.dns.drivers.luadns.LuadnsDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of LuadnsDNSConnection

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

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

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 = 'Luadns'
type = 'luadns'
website: str = 'https://www.luadns.com'

libcloud.dns.drivers.nfsn module

NFSN DNS Driver

class libcloud.dns.drivers.nfsn.NFSNDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of NFSNConnection

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, MX, TXT).

  • data (str) – Data for the record (depends on the record type).

  • extra (dict) – Extra attributes (driver specific, e.g. ‘ttl’). (optional)

Return type:

Record

delete_record(record)[source]

Use this method to delete a record.

Parameters:

record (Record) – record to delete

Return type:

Bool

ex_get_records_by(zone, name=None, type=None)[source]

Return a list of records for the provided zone, filtered by name and/or type.

Parameters:
  • zone (Zone) – Zone to list records for.

  • zone – Zone where the requested records are found.

  • name (str) – name of the records, for example “www”. (optional)

  • type (RecordType) – DNS record type (A, MX, TXT). (optional)

Returns:

list of Record

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:

zone_id (str) – name of the required zone, for example “example.com”.

Return type:

Zone

Raises:

ZoneDoesNotExistError: If no zone could be found.

list_records(zone)[source]

Return a list of all records for the provided zone.

Parameters:

zone (Zone) – Zone to list records for.

Returns:

list of Record

name: str = 'NFSN DNS'
type = 'nfsn'
website: str = 'https://www.nearlyfreespeech.net'

libcloud.dns.drivers.nsone module

class libcloud.dns.drivers.nsone.NsOneDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of NsOneDNSConnection

create_record(name, zone, type, data, extra=None)[source]
Parameters:
  • name (str) – Name of the record to create (e.g. foo).

  • zone (Zone) – Zone where the record should be created.

  • type (str) – Type of record (e.g. A, MX etc)

  • data (str) – Data of the record (e.g. 127.0.0.1 for the A record)

  • extra (dict) – Extra data needed to create different types of records

Returns:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]
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 used through the extra param)

  • extra – Extra attributes that are specific to the driver

such as ttl. :type extra: dict

Return type:

Zone

delete_record(record)[source]
Parameters:

record (Record) – Record to delete.

Returns:

Boolean

delete_zone(zone)[source]
Parameters:

zone (Zone) – Zone to be deleted.

Returns:

Boolean

ex_zone_exists(zone_id, zones_list)[source]

Function to check if a Zone object exists. :param zone_id: ID of the Zone object. :type zone_id: str

Parameters:

zones_list (list.) – A list containing Zone objects.

Return type:

Returns True or False.

get_record(zone_id, record_id)[source]
Parameters:

zone_id – The id of the zone where to search for

the record (e.g. example.com) :type zone_id: str :param record_id: The type of record to search for (e.g. A, AAA, MX etc)

Returns:

Record

get_zone(zone_id)[source]
Parameters:

zone_id – Zone domain name (e.g. example.com)

Returns:

Zone

list_records(zone)[source]
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 = 'NS1 DNS'
type = 'nsone'
update_record(record, name, type, data, extra=None)[source]
Parameters:
  • record (Record) – Record to update

  • name (str) – Name of the record to update (e.g. foo).

  • type (str) – Type of record (e.g. A, MX etc)

  • data (str) – Data of the record (e.g. 127.0.0.1 for the A record)

  • extra (dict) – Extra data needed to create different types of records

Returns:

Record

website: str = 'https://ns1.com'

libcloud.dns.drivers.onapp module

OnApp DNS Driver

class libcloud.dns.drivers.onapp.OnAppDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SOA': 'SOA', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of OnAppConnection

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 – Data for the record (depends on the record type).

Used only for A and AAAA record types. :type data: str

Parameters:

extra (dict) – Extra attributes (driver specific). (optional)

Return type:

Record

For more info, please see: https://docs.onapp.com/display/52API/Add+DNS+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. (This is not really used)

  • extra – Extra attributes (set auto_populate: 0 if you

don’t want to auto populate with existing DNS records). (optional) :type extra: dict

Return type:

Zone

For more info, please see: https://docs.onapp.com/display/52API/Add+DNS+Zone

delete_record(record)[source]

Delete a record.

Parameters:

record (Record) – Record to delete.

Return type:

bool

For more info, please see: https://docs.onapp.com/display/52API/Delete+DNS+Record

delete_zone(zone)[source]

Delete a zone.

Note: This will also delete all the records belonging to this zone.

Parameters:

zone (Zone) – Zone to delete.

Return type:

bool

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 = 'OnApp'
type = 'onapp'
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 – Data for the record (depends on the record type).

Used only for A and AAAA record types. :type data: str

Parameters:

extra (dict) – (optional) Extra attributes (driver specific).

Return type:

Record

For more info, please see: https://docs.onapp.com/display/52API/Edit+DNS+Records

website: str = 'http://onapp.com/'

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: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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]

libcloud.dns.drivers.powerdns module

PowerDNS Driver

class libcloud.dns.drivers.powerdns.PowerDNSDriver(key, secret=None, secure=False, host=None, port=None, api_version='experimental', **kwargs)[source]

Bases: DNSDriver

PowerDNS Driver defaulting to using PowerDNS 3.x API (ie “experimental”).

Parameters:
  • key (str) – API key or username to used (required)

  • secure (bool) – Whether to use HTTPS or HTTP. Note: Off by default for PowerDNS.

  • host (str) – Hostname used for connections.

  • port (int) – Port used for connections.

  • api_version (str) – Specifies the API version to use. experimental and v1 are the only valid options. Defaults to using experimental (optional)

Returns:

None

RECORD_TYPE_MAP: Dict[RecordType, str] = {'A': 'AFSDB', 'AAAA': 'AAAA', 'CERT': 'CERT', 'CNAME': 'CNAME', 'DNSKEY': 'DNSKEY', 'DS': 'DS', 'HINFO': 'HINFO', 'KEY': 'KEY', 'LOC': 'LOC', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'NSEC': 'NSEC', 'OPENPGPKEY': 'OPENPGPKEY', 'PTR': 'PTR', 'RP': 'RP', 'RRSIG': 'RRSIG', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT'}
connectionCls

alias of PowerDNSConnection

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

Create a new record.

There are two PowerDNS-specific quirks here. Firstly, this method will silently clobber any pre-existing records that might already exist. For example, if PowerDNS already contains a “test.example.com” A record, and you create that record using this function, then the old A record will be replaced with your new one.

Secondly, PowerDNS requires that you provide a ttl for all new records. In other words, the “extra” parameter must be {'ttl': <some-integer>} at a minimum.

Parameters:
  • name (str) – FQDN of the new record, for example “www.example.com”.

  • 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, e.g. ‘ttl’). Note that PowerDNS requires a ttl value for every record.

Return type:

Record

create_zone(domain, type=None, ttl=None, extra={})[source]

Create a new zone.

There are two PowerDNS-specific quirks here. Firstly, the “type” and “ttl” parameters are ignored (no-ops). The “type” parameter is simply not implemented, and PowerDNS does not have an ability to set a zone-wide default TTL. (TTLs must be set per-record.)

Secondly, PowerDNS requires that you provide a list of nameservers for the zone upon creation. In other words, the “extra” parameter must be {'nameservers': ['ns1.example.org']} at a minimum.

Parameters:
  • name (str) – Zone domain name (e.g. example.com)

  • domain (Zone) – Zone type (master / slave). (optional). Note that the PowerDNS driver does nothing with this parameter.

  • ttl (int) – TTL for new records. (optional). Note that the PowerDNS driver does nothing with this parameter.

  • extra (dict) – Extra attributes (driver specific). For example, specify extra={'nameservers': ['ns1.example.org']} to set a list of nameservers for this new zone.

Return type:

Zone

delete_record(record)[source]

Use this method to delete a record.

Parameters:

record (Record) – record to delete

Return type:

bool

delete_zone(zone)[source]

Use this method to delete a zone.

Parameters:

zone (Zone) – zone to delete

Return type:

bool

get_zone(zone_id)[source]

Return a Zone instance.

(Note that PowerDNS does not support per-zone TTL defaults, so all Zone objects will have ttl=None.)

Parameters:

zone_id (str) – name of the required zone with the trailing period, for example “example.com.”.

Return type:

Zone

Raises:

ZoneDoesNotExistError: If no zone could be found.

list_records(zone)[source]

Return a list of all 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 = 'PowerDNS'
type = 'powerdns'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record to update.

  • name (str) – FQDN of the new record, for example “www.example.com”.

  • 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

website: str = 'https://www.powerdns.com/'

libcloud.dns.drivers.rackspace module

class libcloud.dns.drivers.rackspace.RackspaceDNSConnection(*args, **kwargs)[source]

Bases: OpenStack_1_1_Connection, PollingConnection

Rackspace DNS Connection class.

Initialize user_id and key; set secure to an int based on passed value.

XML_NAMESPACE = None
auth_url: str = 'https://identity.api.rackspacecloud.com'
get_endpoint()[source]

Selects the endpoint to use based on provider specific values, or overrides passed in by the user when setting up the driver.

Returns:

url of the relevant endpoint for the driver

get_poll_request_kwargs(response, context, request_kwargs)[source]

Return keyword arguments which are passed to the request() method when polling for the job status.

Parameters:
  • response (dict) – Response object returned by poll request.

  • request_kwargs – Kwargs previously used to initiate the poll request.

:return dict Keyword arguments

has_completed(response)[source]

Return job completion status.

Parameters:

response (HTTPResponse) – Response object returned by poll request.

:return bool True if the job has completed, False otherwise.

poll_interval = 2.5
responseCls

alias of RackspaceDNSResponse

timeout: Optional[Union[int, float]] = 30
class libcloud.dns.drivers.rackspace.RackspaceDNSResponse(*args, **kwargs)[source]

Bases: OpenStack_1_1_Response

Rackspace DNS Response class.

Parameters:
  • response (httplib.HTTPResponse) – HTTP response object. (optional)

  • connection (Connection) – Parent connection object.

parse_error()[source]

Parse the error messages.

Override in a provider’s subclass.

Returns:

Parsed error.

Return type:

str

libcloud.dns.drivers.rcodezero module

RcodeZero DNS Driver

class libcloud.dns.drivers.rcodezero.RcodeZeroDNSDriver(key, secret=None, secure=True, host=None, port=None, api_version='v1', **kwargs)[source]

Bases: DNSDriver

Parameters:
  • key (str) – API token to be used (required)

  • secret – Password to be used, ignored by RcodeZero

  • secure (bool) – Whether to use HTTPS (default) or HTTP.

  • host (str) – Hostname used for connections.

  • port (int) – Port used for connections.

  • api_version (str) – Specifies the API version to use. v1 is currently the only valid option (and default)

Returns:

None

RECORD_TYPE_MAP: Dict[RecordType, str] = {'A': 'AFSDB', 'AAAA': 'AAAA', 'ALIAS': 'ALIAS', 'CERT': 'CERT', 'CNAME': 'CNAME', 'DNAME': 'DNAME', 'DNSKEY': 'DNSKEY', 'DS': 'DS', 'HINFO': 'HINFO', 'KEY': 'KEY', 'LOC': 'LOC', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'NSEC': 'NSEC', 'OPENPGPKEY': 'OPENPGPKEY', 'PTR': 'PTR', 'RP': 'RP', 'RRSIG': 'RRSIG', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TLSA': 'TLSA', 'TXT': 'TXT'}
connectionCls

alias of RcodeZeroConnection

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

Create a new record in a given, existing zone.

Parameters:
  • name (str) – name of the new record without the domain name, for example “www”.

  • zone (Zone) – Zone in which the requested record is created.

  • type (RecordType) – DNS resource record type (A, AAAA, …).

  • data (str) – Data for the record (depending on the record type).

  • extra (dict) – Extra attributes: ‘ttl’, ‘disabled’

Return type:

Record

create_zone(domain, type='master', ttl=None, extra={})[source]

Create a new zone.

Parameters:
  • name (str) – Zone domain name (e.g. example.com)

  • domain (Zone) – Zone type (‘master’ / ‘slave’). (required).

  • ttl (int) – TTL for new records. (optional). Ignored by RcodeZero. RcodeZero uses record specific TTLs.

  • extra (dict) – Extra attributes: ‘masters’ (for type=slave): extra={'masters': ['193.0.2.2','2001:db8::2']} sets the Master nameservers for a type=slave zone.

Return type:

Zone

delete_record(record)[source]

Delete a record in a given zone.

Parameters:

record (Record) – record to delete (record object)

Return type:

bool

delete_zone(zone)[source]

Delete a zone and all its records.

Parameters:

zone (Zone) – zone to delete

Return type:

bool

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]

Get a Zone object.

Parameters:

zone_id (str) – name of the zone, for example “example.com”.

Return type:

Zone

Raises:

ZoneDoesNotExistError: if zone could not be found.

list_records(zone)[source]

Return a list of all record objects for the given zone.

Parameters:

zone (Zone) – Zone object to list records for.

Returns:

list of Record

list_zones()[source]

Return a list of zone objects for this account.

Returns:

list of Zone

name: str = 'RcodeZero DNS'
type = 'rcodezero'
update_record(record, name, type, data, extra=None)[source]

Update an existing record.

Parameters:
  • record (Record) – Record object to update.

  • name (str) – name of the new record, for example “www”.

  • type (RecordType) – DNS resource record type (A, AAAA, …).

  • data (str) – Data for the record (depending on the record type).

  • extra (dict) – Extra attributes: ‘ttl’,’disabled’ (optional)

Return type:

Record

update_zone(zone, domain, type=None, 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 (‘master’ / ‘slave’).

  • ttl (int) – not supported. RcodeZero uses RRSet-specific TTLs

  • extra (dict) – Extra attributes: ‘masters’ (for type=slave) extra={'masters': ['193.0.2.2','2001:db8::2']} sets the Master nameserver addresses for a type=slave zone

Return type:

Zone

website: str = 'https://www.rcodezero.at/'

libcloud.dns.drivers.route53 module

class libcloud.dns.drivers.route53.Route53DNSDriver(*args, **kwargs)[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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SOA': 'SOA', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of Route53Connection

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 (master / slave).

  • 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, ex_delete_records=False)[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_multi_value_record(name, zone, type, data, extra=None)[source]

Create a record with multiple values with a single call.

Returns:

A list of created records.

Return type:

list of libcloud.dns.base.Record

ex_delete_all_records(zone)[source]

Remove all the records for the provided zone.

Parameters:

zone (Zone) – Zone to delete records for.

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)[source]

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()[source]

Return a generator to iterate over available zones.

Return type:

generator of Zone

name: str = 'Route53 DNS'
type = 'route53'
update_record(record, name=None, type=None, data=None, 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

website: str = 'http://aws.amazon.com/route53/'

libcloud.dns.drivers.softlayer module

class libcloud.dns.drivers.softlayer.SoftLayerDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'cname', 'MX': 'mx', 'NS': 'ns', 'PTR': 'ptr', 'SOA': 'soa', 'SPF': 'spf', 'SRV': 'srv', 'TXT': 'txt'}
connectionCls

alias of SoftLayerConnection

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, ttl=None, extra=None)[source]

Create a new zone.

Parameters:
  • 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

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

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)[source]

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()[source]

Return a generator to iterate over available zones.

Return type:

generator of Zone

name: str = 'Softlayer DNS'
type = 'softlayer'
update_record(record, name=None, type=None, data=None, 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

website: str = 'https://www.softlayer.com'

libcloud.dns.drivers.vultr module

Vultr DNS Driver

class libcloud.dns.drivers.vultr.VultrDNSConnection(key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]

Bases: VultrConnection

Initialize user_id and key; set secure to an int based on passed value.

responseCls

alias of VultrDNSResponse

class libcloud.dns.drivers.vultr.VultrDNSDriver(key, secret=None, secure=True, host=None, port=None, api_version='2', region=None, **kwargs)[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

name: str = 'Vultr DNS'
type = 'vultr'
website: str = 'https://www.vultr.com'
class libcloud.dns.drivers.vultr.VultrDNSResponse(response, connection)[source]

Bases: VultrResponse

Parameters:
  • response (httplib.HTTPResponse) – HTTP response object. (optional)

  • connection (Connection) – Parent connection object.

exception libcloud.dns.drivers.vultr.ZoneRequiredException[source]

Bases: Exception

libcloud.dns.drivers.worldwidedns module

World Wide DNS Driver

class libcloud.dns.drivers.worldwidedns.WorldWideDNSDriver(key, secret=None, reseller_id=None, secure=True, host=None, port=None, **kwargs)[source]

Bases: DNSDriver

Parameters:
  • key (str) – API key or username to used (required)

  • secret (str) – Secret password to be used (required)

  • reseller_id (str) – Reseller ID for reseller accounts

  • 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', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'SRV': 'SRV', 'TXT': 'TXT'}
connectionCls

alias of WorldWideDNSConnection

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

Create a new record.

We can create 40 record per domain. If all slots are full, we can replace one of them by choosing a specific entry in extra argument.

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 (MX, CNAME, A, NS, SRV, TXT).

  • data (str) – Data for the record (depends on the record type).

  • extra (dict) – Contains ‘entry’ Entry position (1 thru 40)

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 (master / slave).

  • ttl (int) – TTL for new records. (optional)

  • extra (dict) – Extra attributes (driver specific). (optional). Possible parameter in here should be DYN which values should be 1 for standart and 2 for dynamic. Default is 1.

Return type:

Zone

For more info, please see https://www.worldwidedns.net/dns_api_protocol_new_domain.asp or https://www.worldwidedns.net/dns_api_protocol_new_domain_reseller.asp

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

For more information, please see https://www.worldwidedns.net/dns_api_protocol_delete_domain.asp or https://www.worldwidedns.net/dns_api_protocol_delete_domain_reseller.asp

ex_transfer_domain(domain, user_id)[source]

This command will allow you, if you are a reseller, to change the userid on a domain name to another userid in your account ONLY if that new userid is already created.

Parameters:
  • domain (str) – Domain name.

  • user_id (str) – The new userid to connect to the domain name.

Return type:

bool

For more info, please see: https://www.worldwidedns.net/dns_api_protocol_transfer.asp

ex_view_zone(domain, name_server)[source]

View zone file from a name server

Parameters:
  • domain (str) – Domain name.

  • name_server (int) – Name server to check. (1, 2 or 3)

Return type:

str

For more info, please see: https://www.worldwidedns.net/dns_api_protocol_viewzone.asp or https://www.worldwidedns.net/dns_api_protocol_viewzone_reseller.asp

get_record(zone_id, record_id)[source]

Return a Record instance.

Parameters:
  • zone_id (str) – ID of the required zone

  • record_id (str) – ID number 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)[source]

Return a generator to iterate over records for the provided zone.

Parameters:

zone (Zone) – Zone to list records for.

Return type:

generator of Record

list_zones()[source]

Return a list of zones.

Returns:

list of Zone

For more info, please see: https://www.worldwidedns.net/dns_api_protocol_list.asp or https://www.worldwidedns.net/dns_api_protocol_list_reseller.asp

name: str = 'World Wide DNS'
type = 'worldwidedns'
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 (MX, CNAME, A, NS, SRV, TXT).

  • data (str) – Data for the record (depends on the record type).

  • extra (dict) – Contains ‘entry’ Entry position (1 thru 40)

Return type:

Record

update_zone(zone, domain, type='master', ttl=None, extra=None, ex_raw=False)[source]

Update an 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). Values not specified such as SECURE, IP, FOLDER, HOSTMASTER, REFRESH, RETRY and EXPIRE will be kept as already is. The same will be for S(1 to 40), T(1 to 40) and D(1 to 40) if not in raw mode and for ZONENS and ZONEDATA if it is.

  • ex_raw (bool) – Mode we use to do the update using zone file or not.

Return type:

Zone

For more info, please see https://www.worldwidedns.net/dns_api_protocol_list_domain.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_raw.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_reseller.asp or https://www.worldwidedns.net/dns_api_protocol_list_domain_raw_reseller.asp

website: str = 'https://www.worldwidedns.net/'

libcloud.dns.drivers.zerigo module

class libcloud.dns.drivers.zerigo.ZerigoDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'CNAME': 'CNAME', 'GEO': 'GEO', 'MX': 'MX', 'NAPTR': 'NAPTR', 'NS': 'NS', 'PTR': 'PTR', 'REDIRECT': 'REDIRECT', 'SPF': 'SPF', 'SRV': 'SRV', 'TXT': 'TXT', 'URL': 'URL'}
connectionCls

alias of ZerigoDNSConnection

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

Create a new record.

Provider API docs: https://www.zerigo.com/docs/apis/dns/1.1/hosts/create

@inherits: DNSDriver.create_record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Provider API docs: https://www.zerigo.com/docs/apis/dns/1.1/zones/create

@inherits: DNSDriver.create_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_force_slave_axfr(zone)[source]

Force a zone transfer.

Parameters:

zone (Zone) – Zone which should be used.

Return type:

Zone

ex_get_zone_by_domain(domain)[source]

Retrieve a zone object by the domain name.

Parameters:

domain (str) – The domain which should be used

Return type:

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

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:

zone_id (str) – ID of the required zone

Return type:

Zone

iterate_records(zone)[source]

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()[source]

Return a generator to iterate over available zones.

Return type:

generator of Zone

name: str = 'Zerigo DNS'
type = 'zerigo'
update_record(record, name=None, type=None, data=None, 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=None, type=None, ttl=None, extra=None)[source]

Update an existing zone.

Provider API docs: https://www.zerigo.com/docs/apis/dns/1.1/zones/update

@inherits: DNSDriver.update_zone

website: str = 'http://www.zerigo.com/'

libcloud.dns.drivers.zonomi module

Zonomi DNS Driver

class libcloud.dns.drivers.zonomi.ZonomiDNSDriver(key: str, secret: Optional[str] = None, secure: bool = True, host: Optional[str] = None, port: Optional[int] = None, **kwargs: Optional[Any])[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', 'MX': 'MX', 'TXT': 'TXT'}
connectionCls

alias of ZonomiDNSConnection

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, MX, TXT).

  • data (str) – Data for the record (depends on the record type).

  • extra (dict) – Extra attributes (driver specific, e.g. ‘prio’ or ‘ttl’). (optional)

Return type:

Record

create_zone(domain, type='master', ttl=None, extra=None)[source]

Create a new zone.

Parameters:

zone_id (str) – Zone domain name (e.g. example.com)

Return type:

Zone

delete_record(record)[source]

Use this method to 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_convert_to_master(zone)[source]

Convert existent zone to master.

Parameters:

zone (Zone) – Zone to convert.

Return type:

Bool

ex_convert_to_secondary(zone, master)[source]

Convert existent zone to slave.

Parameters:
  • zone (Zone) – Zone to convert.

  • master (str) – the specified master name server IP address.

Return type:

Bool

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 = 'Zonomi DNS'
type = 'zonomi'
website: str = 'https://zonomi.com'

Module contents