certbot.plugins.dns_common_lexicon module

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: str, record_name: str, record_content: str) None[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: str, record_name: str, record_content: str) None[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

certbot.plugins.dns_common_lexicon.build_lexicon_config(lexicon_provider_name: str, lexicon_options: Mapping[str, Any], provider_options: Mapping[str, Any]) Union[None, Dict[str, Any]][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