certbot.plugins.dns_common_lexicon

Common code for DNS Authenticator Plugins built on Lexicon.

class certbot.plugins.dns_common_lexicon.LexiconClient[source]

Bases: object

Encapsulates all communication with a DNS provider via Lexicon.

add_txt_record(domain, record_name, record_content)[source]

Add a TXT record using the supplied information.

Parameters:
  • domain (str) – The domain to use to look up the managed zone.
  • record_name (str) – The record name (typically beginning with ‘_acme-challenge.’).
  • record_content (str) – The record content (typically the challenge validation).
Raises:

errors.PluginError – if an error occurs communicating with the DNS Provider API

del_txt_record(domain, record_name, record_content)[source]

Delete a TXT record using the supplied information.

Parameters:
  • domain (str) – The domain to use to look up the managed zone.
  • record_name (str) – The record name (typically beginning with ‘_acme-challenge.’).
  • record_content (str) – The record content (typically the challenge validation).
Raises:

errors.PluginError – if an error occurs communicating with the DNS Provider API

_find_domain_id(domain)[source]

Find the domain_id for a given domain.

Parameters:domain (str) – The domain for which to find the domain_id.
Raises:errors.PluginError – if the domain_id cannot be found.
certbot.plugins.dns_common_lexicon.build_lexicon_config(lexicon_provider_name, lexicon_options, provider_options)[source]

Convenient function to build a Lexicon 2.x/3.x config object. :param str lexicon_provider_name: the name of the lexicon provider to use :param dict lexicon_options: options specific to lexicon :param dict provider_options: options specific to provider :return: configuration to apply to the provider :rtype: ConfigurationResolver or dict