certwrangler.solvers.edgedns module#
- class certwrangler.solvers.edgedns.EdgeDNSSolver(*, driver: Literal['edgedns'], zones: list[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]$')])]], host: Annotated[str, _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]$')], client_token: str, client_secret: str, access_token: str)[source]#
Bases:
SolverSolver powered by Akamai Edge DNS.
- driver: Literal['edgedns']#
- host: Domain#
- _session: requests.Session#
- create(name: str, domain: str, content: str) None[source]#
Create a TXT record in EdgeDNS.
- Raises:
SolverError – Raised on failures creating the DNS record or unexpected results from the API.
- delete(name: str, domain: str, content: str) None[source]#
Delete a TXT record in EdgeDNS.
- Raises:
SolverError – Raised on failures deleting the DNS record or unexpected results from the API.
- _cleanup_response(response: dict[str, Any]) dict[str, Any][source]#
The EdgeDNS API seems to leave literal double quotes on the strings for TXT records. This just goes through each of the entries to strip them away.
- _delete(endpoint: str) bytes[source]#
Send a DELETE request to the specified endpoint and return the contents of the response.
- Raises:
SolverError – Raised on unexpected results form the API.
- _get(endpoint: str) dict[str, Any] | None[source]#
Send a GET request to the specified endpoint and return the parsed json response.
- Raises:
SolverError – Raised on unexpected results form the API.
- _post(endpoint: str, payload: dict[str, Any]) dict[str, Any][source]#
Send a POST request to the specified endpoint with the specified payload and return the parsed json response.
- Raises:
SolverError – Raised on unexpected results form the API.
- _put(endpoint: str, payload: dict[str, Any]) dict[str, Any][source]#
Send a PUT request to the specified endpoint with the specified payload and return the parsed json response.
- Raises:
SolverError – Raised on unexpected results form the API.
- _get_endpoint(name: str, domain: str) str[source]#
Build the TXT record endpoint for EdgeDNS.
Docs for this endpoint: https://techdocs.akamai.com/edge-dns/reference/delete-zone-name-type https://techdocs.akamai.com/edge-dns/reference/get-zone-name-type https://techdocs.akamai.com/edge-dns/reference/post-zones-zone-names-name-types-type https://techdocs.akamai.com/edge-dns/reference/put-zones-zone-names-name-types-type
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].