certwrangler.solvers.edgedns module#

pydantic model certwrangler.solvers.edgedns.EdgeDNSSolver[source]#

Bases: Solver

Solver powered by Akamai Edge DNS.

Show Entity Relationship Diagram

digraph "Entity Relationship Diagram created by erdantic" { graph [fontcolor=gray66, fontname="Times New Roman,Times,Liberation Serif,serif", fontsize=9, nodesep=0.5, rankdir=LR, ranksep=1.5 ]; node [fontname="Times New Roman,Times,Liberation Serif,serif", fontsize=14, label="\N", shape=plain ]; edge [dir=both]; "certwrangler.solvers.edgedns.EdgeDNSSolver" [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>EdgeDNSSolver</b></td></tr><tr><td>driver</td><td port="driver">Literal['edgedns']</td></tr><tr><td>zones</td><td port="zones">list[str]</td></tr><tr><td>host</td><td port="host">str</td></tr><tr><td>client_token</td><td port="client_token">str</td></tr><tr><td>client_secret</td><td port="client_secret">str</td></tr><tr><td>access_token</td><td port="access_token">str</td></tr></table>>, tooltip="certwrangler.solvers.edgedns.EdgeDNSSolver&#xA;&#xA;Solver powered by Akamai Edge DNS.&#xA;"]; }

Show JSON schema
{
   "title": "EdgeDNSSolver",
   "description": "Solver powered by Akamai Edge DNS.",
   "type": "object",
   "properties": {
      "driver": {
         "const": "edgedns",
         "title": "Driver",
         "type": "string"
      },
      "zones": {
         "description": "A list of DNS zones this solver should be used for.",
         "items": {
            "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]$",
            "type": "string"
         },
         "title": "Zones",
         "type": "array"
      },
      "host": {
         "description": "The Akamai API host.",
         "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]$",
         "title": "Host",
         "type": "string"
      },
      "client_token": {
         "description": "The Akamai API client token.",
         "title": "Client Token",
         "type": "string"
      },
      "client_secret": {
         "description": "The Akamai API client secret.",
         "title": "Client Secret",
         "type": "string"
      },
      "access_token": {
         "description": "The Akamai API access token.",
         "title": "Access Token",
         "type": "string"
      }
   },
   "required": [
      "driver",
      "zones",
      "host",
      "client_token",
      "client_secret",
      "access_token"
   ]
}

Fields:
Validators:

field driver: Literal['edgedns'] [Required]#
field host: Domain [Required]#

The Akamai API host.

Constraints:
  • 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]$

field client_token: str [Required]#

The Akamai API client token.

field client_secret: str [Required]#

The Akamai API client secret.

field access_token: str [Required]#

The Akamai API access token.

_session: requests.Session#
initialize() None[source]#

Set up the auth session to EdgeDNS.

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.