BuddyNS Driver Documentation
BuddyNS.com is part of FrontDam GmbH, a small swiss company making systems for uptime of Internet services, and run by a tribe of passionate people who work great together.
Read more at: https://www.buddyns.com/about/
Instantiating the driver
from libcloud.dns.types import Provider
from libcloud.dns.providers import get_driver
cls = get_driver(Provider.BUDDYNS)
driver = cls("<api key>")
API Docs
- class libcloud.dns.drivers.buddyns.BuddyNSDNSDriver(key: str, secret: str | None = None, secure: bool = True, host: str | None = None, port: int | None = None, **kwargs: Any | None)[source]
- Parameters:
key (
str) – API key or username to used (required)secret (
str) – Secret password to be used (required)secure (
bool) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.host (
str) – Override hostname used for connections.port (
int) – Override port used for connections.
- Returns:
None
- connectionCls
alias of
BuddyNSDNSConnection
- create_record(name: str, zone: Zone, type: RecordType, data: str, extra: dict | None = None) Record
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]
- 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_record(record: Record) bool
Delete a record.
- Parameters:
record (
Record) – Record to delete.- Return type:
bool
- export_zone_to_bind_format(zone: Zone) str
Export Zone object to the BIND compatible format.
- Parameters:
zone (
Zone) – Zone to export.- Returns:
Zone data in BIND compatible format.
- Return type:
str
- export_zone_to_bind_zone_file(zone: Zone, file_path: str) None
Export Zone object to the BIND compatible format and write result to a file.
- Parameters:
zone (
Zone) – Zone to export.file_path (
str) – File path where the output will be saved.
- get_record(zone_id: str, record_id: str) Record
Return a Record instance.
- Parameters:
zone_id (
str) – ID of the required zonerecord_id (
str) – ID of the required record
- Return type:
Record
- iterate_records(zone: Zone) Iterator[Record]
Return a generator to iterate over records for the provided zone.
- Parameters:
zone (
Zone) – Zone to list records for.- Return type:
generatorofRecord
- iterate_zones() Iterator[Zone]
Return a generator to iterate over available zones.
- Return type:
generatorofZone
- list_record_types() List[RecordType]
Return a list of RecordType objects supported by the provider.
- Returns:
listofRecordType
- list_records(zone: Zone) List[Record]
Return a list of records for the provided zone.
- Parameters:
zone (
Zone) – Zone to list records for.- Returns:
listofRecord
- update_record(record, name, type, data, extra=None)
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: Zone, domain: str | None, type: str | None = 'master', ttl: int | None = None, extra: dict | None = None) Zone
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