libcloud.dns.drivers.zerigo module
- class libcloud.dns.drivers.zerigo.ZerigoDNSDriver(key: str, secret: str | None = None, secure: bool = True, host: str | None = None, port: int | None = None, **kwargs: Any | None)[source]
Bases:
DNSDriver
- Parameters:
key (
str
) – API key or username to used (required)secret (
str
) – Secret password to be used (required)secure (
bool
) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.host (
str
) – Override hostname used for connections.port (
int
) – Override port used for connections.
- Returns:
None
- RECORD_TYPE_MAP: Dict[RecordType, str] = {'A': 'A', 'AAAA': 'AAAA', '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 zonerecord_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
ofRecord
- iterate_zones()[source]
Return a generator to iterate over available zones.
- Return type:
generator
ofZone
- 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