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/'