certwrangler.solvers.lexicon module#

class certwrangler.solvers.lexicon.LexiconSolver(*, driver: ~typing.Literal['lexicon'], zones: ~typing.List[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:(\\*\\.|[a-zA-Z0-9])(?:[a-zA-Z0-9-_]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9][A-Za-z0-9-_]{0,61}[A-Za-z]$')])]], provider_name: str, provider_options: ~typing.Dict[str, ~typing.Any] = <factory>)[source]#

Bases: Solver

Solver powered by lexicon.

A full list of available providers and options is available at: https://dns-lexicon.readthedocs.io/en/latest/configuration_reference.html

driver: Literal['lexicon']#
provider_name: str#
provider_options: Dict[str, Any]#
create(name: str, domain: str, content: str) None[source]#

Create a TXT record based on the lexicon config.

Raises:

SolverError – Raised on failures creating the DNS record.

delete(name: str, domain: str, content: str) None[source]#

Delete a TXT record based on the lexicon config.

Raises:

SolverError – Raised on failures deleting the DNS record.

_build_config(action: str, name: str, domain: str, content: str) Dict[str, Any][source]#

Generate the needed lexicon config for the request based on the action and the provider_options.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].