Source code for ngrok.client
-from __future__ import annotations
+# Code generated for API Clients. DO NOT EDIT.
+
+
+from __future__ import annotations
import collections
import os
from .services import *
@@ -282,6 +285,13 @@
def application_users(self) -> ApplicationUsersClient:
return ApplicationUsersClient(self)
+ @property
+ def tunnel_sessions(self) -> TunnelSessionsClient:
+ """Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel
+ sessions that are running and connected to the ngrok service. Each tunnel
+ session can include one or more Tunnels."""
+ return TunnelSessionsClient(self)
+
@property
def certificate_authorities(self) -> CertificateAuthoritiesClient:
"""Certificate Authorities are x509 certificates that are used to sign other
@@ -392,13 +402,6 @@
automated certificate provisioning."""
return TLSCertificatesClient(self)
- @property
- def tunnel_sessions(self) -> TunnelSessionsClient:
- """Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel
- sessions that are running and connected to the ngrok service. Each tunnel
- session can include one or more Tunnels."""
- return TunnelSessionsClient(self)
-
@property
def tunnels(self) -> TunnelsClient:
"""Tunnels provide endpoints to access services exposed by a running ngrok
diff --git a/docs/_modules/ngrok/datatypes.html b/docs/_modules/ngrok/datatypes.html
index e610739..a51d994 100644
--- a/docs/_modules/ngrok/datatypes.html
+++ b/docs/_modules/ngrok/datatypes.html
@@ -166,6 +166,7 @@
Source code for ngrok.datatypes
-from __future__ import annotations
+# Code generated for API Clients. DO NOT EDIT.
+
+
+from __future__ import annotations
from typing import Any, Mapping, Sequence
from datetime import datetime, timedelta
from .iterator import PagedIterator
@@ -360,6 +363,16 @@
def __init__(self, client, props):
self._client = client
self._props = props
+ self._props["certificate_management_policy"] = (
+ AgentIngressCertPolicy(client, props["certificate_management_policy"])
+ if props.get("certificate_management_policy") is not None
+ else None
+ )
+ self._props["certificate_management_status"] = (
+ AgentIngressCertStatus(client, props["certificate_management_status"])
+ if props.get("certificate_management_status") is not None
+ else None
+ )
def __eq__(self, other):
return self._props == other._props
@@ -381,11 +394,13 @@
self,
description: str = None,
metadata: str = None,
+ certificate_management_policy: AgentIngressCertPolicy = None,
):
self._client.agent_ingresses.update(
id=self.id,
description=description,
metadata=metadata,
+ certificate_management_policy=certificate_management_policy,
)Source code for ngrok.error
-from typing import Any, Optional
+# Code generated for API Clients. DO NOT EDIT.
+
+from typing import Any, Optional
[docs]class Error(Exception):
diff --git a/docs/_modules/ngrok/services.html b/docs/_modules/ngrok/services.html
index 61584f3..0302b0b 100644
--- a/docs/_modules/ngrok/services.html
+++ b/docs/_modules/ngrok/services.html
@@ -166,6 +166,7 @@
API Keys
Application Sessions
Application Users
+Tunnel Sessions
Failover Backends
HTTP Response Backends
Tunnel Group Backends
@@ -209,7 +210,6 @@
SSH Host Certificates
SSH User Certificates
TLS Certificates
-Tunnel Sessions
Tunnels
@@ -245,7 +245,10 @@
Source code for ngrok.services
-from __future__ import annotations
+# Code generated for API Clients. DO NOT EDIT.
+
+
+from __future__ import annotations
from collections.abc import Iterator
from typing import Any, Mapping, Sequence
from datetime import datetime, timedelta
@@ -310,12 +313,14 @@
domain: str,
description: str = "",
metadata: str = "",
+ certificate_management_policy: AgentIngressCertPolicy = None,
) -> AgentIngress:
"""Create a new Agent Ingress. The ngrok agent can be configured to connect to ngrok via the new set of addresses on the returned Agent Ingress.
:param description: human-readable description of the use of this Agent Ingress. optional, max 255 bytes.
:param metadata: arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes
:param domain: the domain that you own to be used as the base domain name to generate regional agent ingress domains.
+ :param certificate_management_policy: configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional.
https://ngrok.com/docs/api#api-agent-ingresses-create
"""
@@ -324,6 +329,7 @@
description=description,
metadata=metadata,
domain=domain,
+ certificate_management_policy=extract_props(certificate_management_policy),
)
result = self._client.http_client.post(path, body_arg)
return AgentIngress(self._client, result)
@@ -388,12 +394,14 @@
id: str,
description: str = None,
metadata: str = None,
+ certificate_management_policy: AgentIngressCertPolicy = None,
) -> AgentIngress:
"""Update attributes of an Agent Ingress by ID.
:param id:
:param description: human-readable description of the use of this Agent Ingress. optional, max 255 bytes.
:param metadata: arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes
+ :param certificate_management_policy: configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional.
https://ngrok.com/docs/api#api-agent-ingresses-update
"""
@@ -404,6 +412,7 @@
body_arg = dict(
description=description,
metadata=metadata,
+ certificate_management_policy=extract_props(certificate_management_policy),
)
result = self._client.http_client.patch(path, body_arg)
return AgentIngress(self._client, result) - -create(domain, description='', metadata='')[source]# +create(domain, description='', metadata='', certificate_management_policy=None)[source]#
Create a new Agent Ingress. The ngrok agent can be configured to connect to ngrok via the new set of addresses on the returned Agent Ingress.
- Parameters: @@ -263,6 +263,7 @@
description (
str) – human-readable description of the use of this Agent Ingress. optional, max 255 bytes.metadata (
str) – arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes +domain (
str) – the domain that you own to be used as the base domain name to generate regional agent ingress domains.certificate_management_policy (
Optional[AgentIngressCertPolicy,None]) – configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional.
- -update(id, description=None, metadata=None)[source]# +update(id, description=None, metadata=None, certificate_management_policy=None)[source]#
Update attributes of an Agent Ingress by ID.
- Parameters: @@ -333,6 +334,7 @@
id (
str) –description (
Optional[str,None]) – human-readable description of the use of this Agent Ingress. optional, max 255 bytes. +metadata (
Optional[str,None]) – arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytescertificate_management_policy (
Optional[AgentIngressCertPolicy,None]) – configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional.