def verify(
*,
reattempt: bool = False,
timeout: float | None = None,
) -> CustomDomainResource | Noneasync def verify(
*,
reattempt: bool = False,
timeout: float | None = None,
) -> CustomDomainResource | NoneRuns a single verification pass against the DNS you published. A domain that is not ready yet is not an error: the call returns the new status and failureReason, so branch on status instead of on whether the call raised.
Verification is two staged. The Envless ownership TXT record has to resolve first, and only then is the certificate requested and its own validation records appear in records. A full setup therefore needs at least two calls with a DNS publish between them.
Calls are debounced. Verifying inside the window returns the current state untouched and retryAfterSeconds says when the next real attempt is allowed. Attempts are also capped, and once the cap is spent the only way forward is to remove the domain and claim it again.
Example
from envless import envless
domain = envless.workspace.domain.verify()
if domain and domain['status'] != 'active':
print(
domain['status'],
domain['failureReason'],
domain['retryAfterSeconds'],
)import asyncio
from envless import AsyncEnvless
async def main() -> None:
async with AsyncEnvless() as envless:
domain = await envless.workspace.domain.verify()
if domain and domain['status'] != 'active':
print(
domain['status'],
domain['failureReason'],
domain['retryAfterSeconds'],
)
asyncio.run(main())Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
reattempt | bool | No | Forces a fresh certificate attempt after a failure instead of only re-reading the current state. |
timeout | float | No | Seconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
CustomDomainResource reflecting the pass just run, or None when the API returns no domain.
Worth knowing
- This method takes only keyword arguments. There is no positional hostname, because the domain is whichever one the workspace claimed.
reattemptis always sent, defaulting toFalsewhen you omit it.- Status 409 with
domain.attempt_limitis terminal for that claim. Remove the domain and claim it again.
Required scopes
workspace:write
Underlying endpoint
POST /workspace/domain/verify
Request and response schema, every error code, and a live playground.
In TypeScript
envless.workspace.domain.verify()
The same method in @goenvless/sdk, with the same request, retries and errors.