diff --git a/.tox/dist/ngrok-api-0.0.0.zip b/.tox/dist/ngrok-api-0.0.0.zip
index 06f8e54..015964e 100644
Binary files a/.tox/dist/ngrok-api-0.0.0.zip and b/.tox/dist/ngrok-api-0.0.0.zip differ
diff --git a/.tox/log/GLOB-0.log b/.tox/log/GLOB-0.log
index 70db7ca..0ed6eec 100644
--- a/.tox/log/GLOB-0.log
+++ b/.tox/log/GLOB-0.log
@@ -1,6 +1,6 @@
action: GLOB, msg: packaging
-cwd: /var/lib/buildkite-agent-4/builds/ip-172-31-53-232-us-west-2-compute-internal-4-1/ngrok/api-client-prs/.cache/ngrok-api-python
-cmd: /var/lib/buildkite-agent-4/builds/ip-172-31-53-232-us-west-2-compute-internal-4-1/ngrok/api-client-prs/.cache/ngrok-api-python/venv/bin/python setup.py sdist --formats=zip --dist-dir .tox/dist
+cwd: /var/lib/buildkite-agent-9/builds/ip-172-31-29-111-us-west-2-compute-internal-9-1/ngrok/api-client-prs/.cache/ngrok-api-python
+cmd: /var/lib/buildkite-agent-9/builds/ip-172-31-29-111-us-west-2-compute-internal-9-1/ngrok/api-client-prs/.cache/ngrok-api-python/venv/bin/python setup.py sdist --formats=zip --dist-dir .tox/dist
running sdist
running egg_info
writing ngrok_api.egg-info/PKG-INFO
@@ -37,27 +37,27 @@ copying tests/test_ngrok.py -> ngrok-api-0.0.0/tests
Writing ngrok-api-0.0.0/setup.cfg
creating '.tox/dist/ngrok-api-0.0.0.zip' and adding 'ngrok-api-0.0.0' to it
adding 'ngrok-api-0.0.0'
-adding 'ngrok-api-0.0.0/tests'
-adding 'ngrok-api-0.0.0/ngrok'
adding 'ngrok-api-0.0.0/ngrok_api.egg-info'
-adding 'ngrok-api-0.0.0/README.md'
-adding 'ngrok-api-0.0.0/pyproject.toml'
-adding 'ngrok-api-0.0.0/setup.py'
+adding 'ngrok-api-0.0.0/ngrok'
+adding 'ngrok-api-0.0.0/tests'
adding 'ngrok-api-0.0.0/setup.cfg'
-adding 'ngrok-api-0.0.0/LICENSE'
adding 'ngrok-api-0.0.0/PKG-INFO'
-adding 'ngrok-api-0.0.0/tests/test_ngrok.py'
-adding 'ngrok-api-0.0.0/ngrok/utils.py'
+adding 'ngrok-api-0.0.0/pyproject.toml'
+adding 'ngrok-api-0.0.0/README.md'
+adding 'ngrok-api-0.0.0/LICENSE'
+adding 'ngrok-api-0.0.0/setup.py'
+adding 'ngrok-api-0.0.0/ngrok_api.egg-info/dependency_links.txt'
+adding 'ngrok-api-0.0.0/ngrok_api.egg-info/PKG-INFO'
+adding 'ngrok-api-0.0.0/ngrok_api.egg-info/top_level.txt'
+adding 'ngrok-api-0.0.0/ngrok_api.egg-info/requires.txt'
+adding 'ngrok-api-0.0.0/ngrok_api.egg-info/SOURCES.txt'
adding 'ngrok-api-0.0.0/ngrok/client.py'
-adding 'ngrok-api-0.0.0/ngrok/http_client.py'
+adding 'ngrok-api-0.0.0/ngrok/utils.py'
adding 'ngrok-api-0.0.0/ngrok/datatypes.py'
-adding 'ngrok-api-0.0.0/ngrok/iterator.py'
-adding 'ngrok-api-0.0.0/ngrok/__init__.py'
+adding 'ngrok-api-0.0.0/ngrok/http_client.py'
adding 'ngrok-api-0.0.0/ngrok/services.py'
+adding 'ngrok-api-0.0.0/ngrok/__init__.py'
+adding 'ngrok-api-0.0.0/ngrok/iterator.py'
adding 'ngrok-api-0.0.0/ngrok/error.py'
-adding 'ngrok-api-0.0.0/ngrok_api.egg-info/SOURCES.txt'
-adding 'ngrok-api-0.0.0/ngrok_api.egg-info/requires.txt'
-adding 'ngrok-api-0.0.0/ngrok_api.egg-info/dependency_links.txt'
-adding 'ngrok-api-0.0.0/ngrok_api.egg-info/top_level.txt'
-adding 'ngrok-api-0.0.0/ngrok_api.egg-info/PKG-INFO'
+adding 'ngrok-api-0.0.0/tests/test_ngrok.py'
removing 'ngrok-api-0.0.0' (and everything under it)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index caf55e1..5779dbf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,12 @@
+## 0.11.0
+
+* Added support for the Bot User API. The Bot User API allows you to manage the bots that are registered to your ngrok account. You can automate the creation, management, and deletion of bot users in your account.
+
## 0.10.0
ENHANCEMENTS:
* Added `owner_id` field to the `api_key`, `credential`, and `ssh_credential` resources. If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot.
* Added `failover_backend`, `http_response_backend`, and `tunnel_group_backend` resources. A Failover backend defines failover behavior within a list of referenced backends. Traffic is sent to the first backend in the list. If that backend is offline or no connection can be established, ngrok attempts to connect to the next backend in the list until one is successful.
-
diff --git a/doc/source/bot_users.rst b/doc/source/bot_users.rst
new file mode 100644
index 0000000..85ee653
--- /dev/null
+++ b/doc/source/bot_users.rst
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+Bot Users
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.bot_users` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: BotUsersClient
+ :undoc-members: BotUsersClient
diff --git a/doc/source/edge_route_policy_module.rst b/doc/source/edge_route_policy_module.rst
new file mode 100644
index 0000000..5b8222f
--- /dev/null
+++ b/doc/source/edge_route_policy_module.rst
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+HTTPS Edge Route Policies Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.edge_route_policy_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: EdgeRoutePolicyModuleClient
+ :undoc-members: EdgeRoutePolicyModuleClient
diff --git a/doc/source/edge_route_user_agent_filter_module.rst b/doc/source/edge_route_user_agent_filter_module.rst
new file mode 100644
index 0000000..af22ce2
--- /dev/null
+++ b/doc/source/edge_route_user_agent_filter_module.rst
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+HTTPS Edge Route User Agent Filter Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.edge_route_user_agent_filter_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: EdgeRouteUserAgentFilterModuleClient
+ :undoc-members: EdgeRouteUserAgentFilterModuleClient
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 1fce46a..e53f0af 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -131,8 +131,10 @@ API Reference
tunnel_sessions
failover_backends
http_response_backends
+ static_backends
tunnel_group_backends
weighted_backends
+ bot_users
certificate_authorities
credentials
edges_https_routes
@@ -150,14 +152,18 @@ API Reference
edge_route_saml_module
edge_route_oidc_module
edge_route_websocket_tcp_converter_module
+ edge_route_user_agent_filter_module
+ edge_route_policy_module
edges_tcp
tcp_edge_backend_module
tcp_edge_ip_restriction_module
+ tcp_edge_policy_module
edges_tls
tls_edge_backend_module
tls_edge_ip_restriction_module
tls_edge_mutual_tls_module
tls_edge_tls_termination_module
+ tls_edge_policy_module
endpoints
event_destinations
event_subscriptions
diff --git a/doc/source/static_backends.rst b/doc/source/static_backends.rst
new file mode 100644
index 0000000..dfddbd5
--- /dev/null
+++ b/doc/source/static_backends.rst
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+Static Backends
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.static_backends` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: StaticBackendsClient
+ :undoc-members: StaticBackendsClient
diff --git a/doc/source/tcp_edge_policy_module.rst b/doc/source/tcp_edge_policy_module.rst
new file mode 100644
index 0000000..6a6a6c6
--- /dev/null
+++ b/doc/source/tcp_edge_policy_module.rst
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+TCP Edge Policy Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.tcp_edge_policy_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: TCPEdgePolicyModuleClient
+ :undoc-members: TCPEdgePolicyModuleClient
diff --git a/doc/source/tls_edge_policy_module.rst b/doc/source/tls_edge_policy_module.rst
new file mode 100644
index 0000000..5f19264
--- /dev/null
+++ b/doc/source/tls_edge_policy_module.rst
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+TLS Edge Policy Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.tls_edge_policy_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: TLSEdgePolicyModuleClient
+ :undoc-members: TLSEdgePolicyModuleClient
diff --git a/docs/_modules/index.html b/docs/_modules/index.html
index 55c1940..e961ad4 100644
--- a/docs/_modules/index.html
+++ b/docs/_modules/index.html
@@ -169,8 +169,10 @@
session can include one or more Tunnels."""
return TunnelSessionsClient(self)
+ @property
+ def bot_users(self) -> BotUsersClient:
+ return BotUsersClient(self)
+
@property
def certificate_authorities(self) -> CertificateAuthoritiesClient:
"""Certificate Authorities are x509 certificates that are used to sign other
@@ -415,6 +425,7 @@ Source code for ngrok.client
[
"failover",
"http_response",
+ "static_address",
"tunnel_group",
"weighted",
],
@@ -422,6 +433,7 @@ Source code for ngrok.client
return ns(
failover=FailoverBackendsClient(self),
http_response=HTTPResponseBackendsClient(self),
+ static_address=StaticBackendsClient(self),
tunnel_group=TunnelGroupBackendsClient(self),
weighted=WeightedBackendsClient(self),
)
@@ -462,6 +474,7 @@ Source code for ngrok.client
"https_edge_route_saml",
"https_edge_route_oidc",
"https_edge_route_websocket_tcp_converter",
+ "https_edge_route_user_agent_filter",
"tcp_edge_backend",
"tcp_edge_ip_restriction",
"tls_edge_backend",
@@ -490,6 +503,9 @@ Source code for ngrok.client
https_edge_route_websocket_tcp_converter=EdgeRouteWebsocketTCPConverterModuleClient(
self
),
+ https_edge_route_user_agent_filter=EdgeRouteUserAgentFilterModuleClient(
+ self
+ ),
tcp_edge_backend=TCPEdgeBackendModuleClient(self),
tcp_edge_ip_restriction=TCPEdgeIPRestrictionModuleClient(self),
tls_edge_backend=TLSEdgeBackendModuleClient(self),
diff --git a/docs/_modules/ngrok/datatypes.html b/docs/_modules/ngrok/datatypes.html
index a51d994..b64d01d 100644
--- a/docs/_modules/ngrok/datatypes.html
+++ b/docs/_modules/ngrok/datatypes.html
@@ -169,8 +169,10 @@
Tunnel Sessions
Failover Backends
HTTP Response Backends
+
Static Backends
Tunnel Group Backends
Weighted Backends
+
Bot Users
Certificate Authorities
Tunnel Credentials
HTTPS Edge Routes
@@ -188,14 +190,18 @@
HTTPS Edge Route SAML Module
HTTPS Edge Route OIDC Module
HTTPS Edge Route Websocket TCP Converter Module
+
HTTPS Edge Route User Agent Filter Module
+
HTTPS Edge Route Policies Module
TCP Edges
TCP Edge Backend Module
TCP Edge IP Restriction Module
+
TCP Edge Policy Module
TLS Edges
TLS Edge Backend Module
TLS Edge IP Restriction Module
TLS Edge Mutual TLS Module
TLS Edge TLS Termination Module
+
TLS Edge Policy Module
Endpoints
Event Destinations
Event Subscriptions
@@ -1408,6 +1414,141 @@
Source code for ngrok.datatypes
return self._props["next_page_uri"]
+
[docs]class StaticBackend(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
self._props["tls"] = (
+
StaticBackendTLS(client, props["tls"])
+
if props.get("tls") is not None
+
else None
+
)
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<StaticBackend {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<StaticBackend {}>".format(repr(self._props))
+
+
[docs] def delete(
+
self,
+
):
+
self._client.backends.static_address.delete(
+
id=self.id,
+
)
+
+
[docs] def update(
+
self,
+
description: str = None,
+
metadata: str = None,
+
address: str = "",
+
tls: StaticBackendTLS = None,
+
):
+
self._client.backends.static_address.update(
+
id=self.id,
+
description=description,
+
metadata=metadata,
+
address=address,
+
tls=tls,
+
)
+
+
@property
+
def id(self) -> str:
+
"""unique identifier for this static backend"""
+
return self._props["id"]
+
+
@property
+
def uri(self) -> str:
+
"""URI of the StaticBackend API resource"""
+
return self._props["uri"]
+
+
@property
+
def created_at(self) -> datetime:
+
"""timestamp when the backend was created, RFC 3339 format"""
+
return self._props["created_at"]
+
+
@property
+
def description(self) -> str:
+
"""human-readable description of this backend. Optional"""
+
return self._props["description"]
+
+
@property
+
def metadata(self) -> str:
+
"""arbitrary user-defined machine-readable data of this backend. Optional"""
+
return self._props["metadata"]
+
+
@property
+
def address(self) -> str:
+
"""the address to forward to"""
+
return self._props["address"]
+
+
@property
+
def tls(self) -> StaticBackendTLS:
+
"""tls configuration to use"""
+
return self._props["tls"]
+
+
+
[docs]class StaticBackendTLS(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<StaticBackendTLS {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<StaticBackendTLS {}>".format(repr(self._props))
+
+
@property
+
def enabled(self) -> bool:
+
"""if TLS is checked"""
+
return self._props["enabled"]
+
+
+
[docs]class StaticBackendList(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
self._props["backends"] = (
+
[StaticBackend(client, x) for x in props["backends"]]
+
if props.get("backends") is not None
+
else []
+
)
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<StaticBackendList {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<StaticBackendList {}>".format(repr(self._props))
+
+
def __iter__(self):
+
return PagedIterator(self._client, self, "backends")
+
+
@property
+
def backends(self) -> Sequence[StaticBackend]:
+
"""the list of all static backends on this account"""
+
return self._props["backends"]
+
+
@property
+
def uri(self) -> str:
+
"""URI of the static backends list API resource"""
+
return self._props["uri"]
+
+
@property
+
def next_page_uri(self) -> str:
+
"""URI of the next page, or null if there is no next page"""
+
return self._props["next_page_uri"]
+
+
[docs]class TunnelGroupBackend(object):
def __init__(self, client, props):
self._client = client
@@ -1624,6 +1765,102 @@
Source code for ngrok.datatypes
return self._props["next_page_uri"]
+
[docs]class BotUser(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<BotUser {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<BotUser {}>".format(repr(self._props))
+
+
[docs] def delete(
+
self,
+
):
+
self._client.bot_users.delete(
+
id=self.id,
+
)
+
+
[docs] def update(
+
self,
+
name: str = None,
+
active: bool = None,
+
):
+
self._client.bot_users.update(
+
id=self.id,
+
name=name,
+
active=active,
+
)
+
+
@property
+
def id(self) -> str:
+
"""unique API key resource identifier"""
+
return self._props["id"]
+
+
@property
+
def uri(self) -> str:
+
"""URI to the API resource of this bot user"""
+
return self._props["uri"]
+
+
@property
+
def name(self) -> str:
+
"""human-readable name used to identify the bot"""
+
return self._props["name"]
+
+
@property
+
def active(self) -> bool:
+
"""whether or not the bot is active"""
+
return self._props["active"]
+
+
@property
+
def created_at(self) -> datetime:
+
"""timestamp when the api key was created, RFC 3339 format"""
+
return self._props["created_at"]
+
+
+
[docs]class BotUserList(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
self._props["bot_users"] = (
+
[BotUser(client, x) for x in props["bot_users"]]
+
if props.get("bot_users") is not None
+
else []
+
)
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<BotUserList {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<BotUserList {}>".format(repr(self._props))
+
+
def __iter__(self):
+
return PagedIterator(self._client, self, "bot_users")
+
+
@property
+
def bot_users(self) -> Sequence[BotUser]:
+
"""the list of all bot users on this account"""
+
return self._props["bot_users"]
+
+
@property
+
def uri(self) -> str:
+
"""URI of the bot users list API resource"""
+
return self._props["uri"]
+
+
@property
+
def next_page_uri(self) -> str:
+
"""URI of the next page, or null if there is no next page"""
+
return self._props["next_page_uri"]
+
+
[docs]class CertificateAuthority(object):
def __init__(self, client, props):
self._client = client
@@ -1886,7 +2123,7 @@
Source code for ngrok.datatypes
@property
def provider(self) -> str:
- """a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers defined at `https://ngrok.com/docs/cloud-edge/modules/webhook <https://ngrok.com/docs/cloud-edge/modules/webhook>`_"""
+ """a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers defined at `https://ngrok.com/docs/cloud-edge/modules/webhook-verification <https://ngrok.com/docs/cloud-edge/modules/webhook-verification>`_"""
return self._props["provider"]
@property
@@ -2937,6 +3174,133 @@ Source code for ngrok.datatypes
return self._props["enabled"]
+[docs]class EndpointUserAgentFilter(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<EndpointUserAgentFilter {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<EndpointUserAgentFilter {}>".format(repr(self._props))
+
+
@property
+
def enabled(self) -> bool:
+
return self._props["enabled"]
+
+
@property
+
def allow(self) -> Sequence[str]:
+
return self._props["allow"]
+
+
@property
+
def deny(self) -> Sequence[str]:
+
return self._props["deny"]
+
+
+[docs]class EndpointPolicy(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
self._props["inbound"] = (
+
[EndpointRule(client, x) for x in props["inbound"]]
+
if props.get("inbound") is not None
+
else []
+
)
+
self._props["outbound"] = (
+
[EndpointRule(client, x) for x in props["outbound"]]
+
if props.get("outbound") is not None
+
else []
+
)
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<EndpointPolicy {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<EndpointPolicy {}>".format(repr(self._props))
+
+
@property
+
def enabled(self) -> bool:
+
"""``true`` if the module will be applied to traffic, ``false`` to disable. default ``true`` if unspecified"""
+
return self._props["enabled"]
+
+
@property
+
def inbound(self) -> Sequence[EndpointRule]:
+
"""the inbound rules of the traffic policy."""
+
return self._props["inbound"]
+
+
@property
+
def outbound(self) -> Sequence[EndpointRule]:
+
"""the outbound rules on the traffic policy."""
+
return self._props["outbound"]
+
+
+[docs]class EndpointRule(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
self._props["actions"] = (
+
[EndpointAction(client, x) for x in props["actions"]]
+
if props.get("actions") is not None
+
else []
+
)
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<EndpointRule {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<EndpointRule {}>".format(repr(self._props))
+
+
@property
+
def expressions(self) -> Sequence[str]:
+
"""cel expressions that filter traffic the policy rule applies to."""
+
return self._props["expressions"]
+
+
@property
+
def actions(self) -> Sequence[EndpointAction]:
+
"""the set of actions on a policy rule."""
+
return self._props["actions"]
+
+
@property
+
def name(self) -> str:
+
"""the name of the rule that is part of the traffic policy."""
+
return self._props["name"]
+
+
+[docs]class EndpointAction(object):
+
def __init__(self, client, props):
+
self._client = client
+
self._props = props
+
+
def __eq__(self, other):
+
return self._props == other._props
+
+
def __str__(self):
+
if "id" in self._props:
+
return "<EndpointAction {} {}>".format(self.id, repr(self._props))
+
else:
+
return "<EndpointAction {}>".format(repr(self._props))
+
+
@property
+
def type(self) -> str:
+
"""the type of action on the policy rule."""
+
return self._props["type"]
+
+
@property
+
def config(self) -> object:
+
"""the configuration for the action on the policy rule."""
+
return self._props["config"]
+
+
[docs]class HTTPSEdgeRoute(object):
def __init__(self, client, props):
self._client = client
@@ -2996,6 +3360,16 @@
Source code for ngrok.datatypes
if props.get("websocket_tcp_converter") is not None
else None
)
+ self._props["user_agent_filter"] = (
+ EndpointUserAgentFilter(client, props["user_agent_filter"])
+ if props.get("user_agent_filter") is not None
+ else None
+ )
+ self._props["policy"] = (
+ EndpointPolicy(client, props["policy"])
+ if props.get("policy") is not None
+ else None
+ )
def __eq__(self, other):
return self._props == other._props
@@ -3023,6 +3397,8 @@ Source code for ngrok.datatypes
saml: EndpointSAMLMutate = None,
oidc: EndpointOIDC = None,
websocket_tcp_converter: EndpointWebsocketTCPConverter = None,
+ user_agent_filter: EndpointUserAgentFilter = None,
+ policy: EndpointPolicy = None,
):
self._client.edges.https_routes.update(
edge_id=self.edge_id,
@@ -3042,6 +3418,8 @@ Source code for ngrok.datatypes
saml=saml,
oidc=oidc,
websocket_tcp_converter=websocket_tcp_converter,
+ user_agent_filter=user_agent_filter,
+ policy=policy,
)
[docs] def delete(
@@ -3145,7 +3523,16 @@
Source code for ngrok.datatypes
@property
def websocket_tcp_converter(self) -> EndpointWebsocketTCPConverter:
"""websocket to tcp adapter configuration or ``null``"""
- return self._props["websocket_tcp_converter"]
+
return self._props["websocket_tcp_converter"]
+
+
@property
+
def user_agent_filter(self) -> EndpointUserAgentFilter:
+
return self._props["user_agent_filter"]
+
+
@property
+
def policy(self) -> EndpointPolicy:
+
"""the traffic policy associated with this edge or null"""
+
return self._props["policy"]
[docs]class HTTPSEdgeList(object):
@@ -3336,6 +3723,11 @@
Source code for ngrok.datatypes
if props.get("ip_restriction") is not None
else None
)
+ self._props["policy"] = (
+ EndpointPolicy(client, props["policy"])
+ if props.get("policy") is not None
+ else None
+ )
def __eq__(self, other):
return self._props == other._props
@@ -3353,6 +3745,7 @@ Source code for ngrok.datatypes
hostports: Sequence[str] = None,
backend: EndpointBackendMutate = None,
ip_restriction: EndpointIPPolicyMutate = None,
+ policy: EndpointPolicy = None,
):
self._client.edges.tcp.update(
id=self.id,
@@ -3361,6 +3754,7 @@ Source code for ngrok.datatypes
hostports=hostports,
backend=backend,
ip_restriction=ip_restriction,
+ policy=policy,
)
[docs] def delete(
@@ -3407,7 +3801,12 @@
Source code for ngrok.datatypes
@property
def ip_restriction(self) -> EndpointIPPolicy:
- return self._props["ip_restriction"]
+
return self._props["ip_restriction"]
+
+
@property
+
def policy(self) -> EndpointPolicy:
+
"""the traffic policy associated with this edge or null"""
+
return self._props["policy"]
[docs]class TLSEdgeList(object):
@@ -3472,6 +3871,11 @@
Source code for ngrok.datatypes
if props.get("tls_termination") is not None
else None
)
+ self._props["policy"] = (
+ EndpointPolicy(client, props["policy"])
+ if props.get("policy") is not None
+ else None
+ )
def __eq__(self, other):
return self._props == other._props
@@ -3491,6 +3895,7 @@ Source code for ngrok.datatypes
ip_restriction: EndpointIPPolicyMutate = None,
mutual_tls: EndpointMutualTLSMutate = None,
tls_termination: EndpointTLSTermination = None,
+ policy: EndpointPolicy = None,
):
self._client.edges.tls.update(
id=self.id,
@@ -3501,6 +3906,7 @@ Source code for ngrok.datatypes
ip_restriction=ip_restriction,
mutual_tls=mutual_tls,
tls_termination=tls_termination,
+ policy=policy,
)
[docs] def delete(
@@ -3555,7 +3961,12 @@
Source code for ngrok.datatypes
@property
def tls_termination(self) -> EndpointTLSTermination:
- return self._props["tls_termination"]
+
return self._props["tls_termination"]
+
+
@property
+
def policy(self) -> EndpointPolicy:
+
"""the traffic policy associated with this edge or null"""
+
return self._props["policy"]
[docs]class Endpoint(object):
@@ -4706,12 +5117,12 @@
Source code for ngrok.datatypes
@property
def region(self) -> str:
- """reserve the domain in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa)"""
+ """deprecated: With the launch of the ngrok Global Network domains traffic is now handled globally. This field applied only to endpoints. Note that agents may still connect to specific regions. Optional, null by default. (au, eu, ap, us, jp, in, sa)"""
return self._props["region"]
@property
def cname_target(self) -> str:
- """DNS CNAME target for a custom hostname, or null if the reserved domain is a subdomain of *.ngrok.io"""
+ """DNS CNAME target for a custom hostname, or null if the reserved domain is a subdomain of an ngrok owned domain (e.g. *.ngrok.app)"""
return self._props["cname_target"]
@property
diff --git a/docs/_modules/ngrok/error.html b/docs/_modules/ngrok/error.html
index c63d798..ac58a95 100644
--- a/docs/_modules/ngrok/error.html
+++ b/docs/_modules/ngrok/error.html
@@ -169,8 +169,10 @@
Tunnel Sessions
Failover Backends
HTTP Response Backends
+
Static Backends
Tunnel Group Backends
Weighted Backends
+
Bot Users
Certificate Authorities
Tunnel Credentials
HTTPS Edge Routes
@@ -188,14 +190,18 @@
HTTPS Edge Route SAML Module
HTTPS Edge Route OIDC Module
HTTPS Edge Route Websocket TCP Converter Module
+
HTTPS Edge Route User Agent Filter Module
+
HTTPS Edge Route Policies Module
TCP Edges
TCP Edge Backend Module
TCP Edge IP Restriction Module
+
TCP Edge Policy Module
TLS Edges
TLS Edge Backend Module
TLS Edge IP Restriction Module
TLS Edge Mutual TLS Module
TLS Edge TLS Termination Module
+
TLS Edge Policy Module
Endpoints
Event Destinations
Event Subscriptions
diff --git a/docs/_modules/ngrok/services.html b/docs/_modules/ngrok/services.html
index 0302b0b..6d64bf1 100644
--- a/docs/_modules/ngrok/services.html
+++ b/docs/_modules/ngrok/services.html
@@ -169,8 +169,10 @@
Tunnel Sessions
Failover Backends
HTTP Response Backends
+
Static Backends
Tunnel Group Backends
Weighted Backends
+
Bot Users
Certificate Authorities
Tunnel Credentials
HTTPS Edge Routes
@@ -188,14 +190,18 @@
HTTPS Edge Route SAML Module
HTTPS Edge Route OIDC Module
HTTPS Edge Route Websocket TCP Converter Module
+
HTTPS Edge Route User Agent Filter Module
+
HTTPS Edge Route Policies Module
TCP Edges
TCP Edge Backend Module
TCP Edge IP Restriction Module
+
TCP Edge Policy Module
TLS Edges
TLS Edge Backend Module
TLS Edge IP Restriction Module
TLS Edge Mutual TLS Module
TLS Edge TLS Termination Module
+
TLS Edge Policy Module
Endpoints
Event Destinations
Event Subscriptions
@@ -989,6 +995,126 @@
Source code for ngrok.services
return HTTPResponseBackend(self._client, result)
+
[docs]class StaticBackendsClient(object):
+
"""A static backend sends traffic to a TCP address (hostname and port) that
+
is reachable on the public internet."""
+
+
def __init__(self, client):
+
self._client = client
+
+
[docs] def create(
+
self,
+
description: str = "",
+
metadata: str = "",
+
address: str = "",
+
tls: StaticBackendTLS = None,
+
) -> StaticBackend:
+
"""Create a new static backend
+
+
:param description: human-readable description of this backend. Optional
+
:param metadata: arbitrary user-defined machine-readable data of this backend. Optional
+
:param address: the address to forward to
+
:param tls: tls configuration to use
+
+
https://ngrok.com/docs/api#api-static-backends-create
+
"""
+
path = "/backends/static"
+
body_arg = dict(
+
description=description,
+
metadata=metadata,
+
address=address,
+
tls=extract_props(tls),
+
)
+
result = self._client.http_client.post(path, body_arg)
+
return StaticBackend(self._client, result)
+
+
[docs] def delete(
+
self,
+
id: str,
+
):
+
"""Delete a static backend by ID.
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-static-backends-delete
+
"""
+
path = "/backends/static/{id}"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
self._client.http_client.delete(path, body_arg)
+
+
[docs] def get(
+
self,
+
id: str,
+
) -> StaticBackend:
+
"""Get detailed information about a static backend by ID
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-static-backends-get
+
"""
+
path = "/backends/static/{id}"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
result = self._client.http_client.get(path, body_arg)
+
return StaticBackend(self._client, result)
+
+
[docs] def list(
+
self,
+
before_id: str = None,
+
limit: str = None,
+
) -> StaticBackendList:
+
"""List all static backends on this account
+
+
:param before_id:
+
:param limit:
+
+
https://ngrok.com/docs/api#api-static-backends-list
+
"""
+
path = "/backends/static"
+
body_arg = dict(
+
before_id=before_id,
+
limit=limit,
+
)
+
result = self._client.http_client.get(path, body_arg)
+
return StaticBackendList(self._client, result)
+
+
[docs] def update(
+
self,
+
id: str,
+
description: str = None,
+
metadata: str = None,
+
address: str = "",
+
tls: StaticBackendTLS = None,
+
) -> StaticBackend:
+
"""Update static backend by ID
+
+
:param id:
+
:param description: human-readable description of this backend. Optional
+
:param metadata: arbitrary user-defined machine-readable data of this backend. Optional
+
:param address: the address to forward to
+
:param tls: tls configuration to use
+
+
https://ngrok.com/docs/api#api-static-backends-update
+
"""
+
path = "/backends/static/{id}"
+
path = path.format(
+
id=id,
+
)
+
body_arg = dict(
+
description=description,
+
metadata=metadata,
+
address=address,
+
tls=extract_props(tls),
+
)
+
result = self._client.http_client.patch(path, body_arg)
+
return StaticBackend(self._client, result)
+
+
[docs]class TunnelGroupBackendsClient(object):
"""A Tunnel Group Backend balances traffic among all online tunnels that match
a label selector."""
@@ -1219,6 +1345,111 @@
Source code for ngrok.services
return WeightedBackend(self._client, result)
+
[docs]class BotUsersClient(object):
+
def __init__(self, client):
+
self._client = client
+
+
[docs] def create(
+
self,
+
name: str = "",
+
active: bool = None,
+
) -> BotUser:
+
"""Create a new bot user
+
+
:param name: human-readable name used to identify the bot
+
:param active: whether or not the bot is active
+
+
https://ngrok.com/docs/api#api-bot-users-create
+
"""
+
path = "/bot_users"
+
body_arg = dict(
+
name=name,
+
active=active,
+
)
+
result = self._client.http_client.post(path, body_arg)
+
return BotUser(self._client, result)
+
+
[docs] def delete(
+
self,
+
id: str,
+
):
+
"""Delete a bot user by ID
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-bot-users-delete
+
"""
+
path = "/bot_users/{id}"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
self._client.http_client.delete(path, body_arg)
+
+
[docs] def get(
+
self,
+
id: str,
+
) -> BotUser:
+
"""Get the details of a Bot User by ID.
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-bot-users-get
+
"""
+
path = "/bot_users/{id}"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
result = self._client.http_client.get(path, body_arg)
+
return BotUser(self._client, result)
+
+
[docs] def list(
+
self,
+
before_id: str = None,
+
limit: str = None,
+
) -> BotUserList:
+
"""List all bot users in this account.
+
+
:param before_id:
+
:param limit:
+
+
https://ngrok.com/docs/api#api-bot-users-list
+
"""
+
path = "/bot_users"
+
body_arg = dict(
+
before_id=before_id,
+
limit=limit,
+
)
+
result = self._client.http_client.get(path, body_arg)
+
return BotUserList(self._client, result)
+
+
[docs] def update(
+
self,
+
id: str,
+
name: str = None,
+
active: bool = None,
+
) -> BotUser:
+
"""Update attributes of a bot user by ID.
+
+
:param id:
+
:param name: human-readable name used to identify the bot
+
:param active: whether or not the bot is active
+
+
https://ngrok.com/docs/api#api-bot-users-update
+
"""
+
path = "/bot_users/{id}"
+
path = path.format(
+
id=id,
+
)
+
body_arg = dict(
+
name=name,
+
active=active,
+
)
+
result = self._client.http_client.patch(path, body_arg)
+
return BotUser(self._client, result)
+
+
[docs]class CertificateAuthoritiesClient(object):
"""Certificate Authorities are x509 certificates that are used to sign other
x509 certificates. Attach a Certificate Authority to the Mutual TLS module
@@ -1474,6 +1705,8 @@
Source code for ngrok.services
saml: EndpointSAMLMutate = None,
oidc: EndpointOIDC = None,
websocket_tcp_converter: EndpointWebsocketTCPConverter = None,
+ user_agent_filter: EndpointUserAgentFilter = None,
+ policy: EndpointPolicy = None,
) -> HTTPSEdgeRoute:
"""Create an HTTPS Edge Route
@@ -1493,6 +1726,8 @@ Source code for ngrok.services
:param saml: saml module configuration or ``null``
:param oidc: oidc module configuration or ``null``
:param websocket_tcp_converter: websocket to tcp adapter configuration or ``null``
+ :param user_agent_filter:
+ :param policy: the traffic policy associated with this edge or null
https://ngrok.com/docs/api#api-edges-https-routes-create
"""
@@ -1516,6 +1751,8 @@ Source code for ngrok.services
saml=extract_props(saml),
oidc=extract_props(oidc),
websocket_tcp_converter=extract_props(websocket_tcp_converter),
+ user_agent_filter=extract_props(user_agent_filter),
+ policy=extract_props(policy),
)
result = self._client.http_client.post(path, body_arg)
return HTTPSEdgeRoute(self._client, result)
@@ -1560,6 +1797,8 @@ Source code for ngrok.services
saml: EndpointSAMLMutate = None,
oidc: EndpointOIDC = None,
websocket_tcp_converter: EndpointWebsocketTCPConverter = None,
+ user_agent_filter: EndpointUserAgentFilter = None,
+ policy: EndpointPolicy = None,
) -> HTTPSEdgeRoute:
"""Updates an HTTPS Edge Route by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
@@ -1580,6 +1819,8 @@ Source code for ngrok.services
:param saml: saml module configuration or ``null``
:param oidc: oidc module configuration or ``null``
:param websocket_tcp_converter: websocket to tcp adapter configuration or ``null``
+ :param user_agent_filter:
+ :param policy: the traffic policy associated with this edge or null
https://ngrok.com/docs/api#api-edges-https-routes-update
"""
@@ -1604,6 +1845,8 @@ Source code for ngrok.services
saml=extract_props(saml),
oidc=extract_props(oidc),
websocket_tcp_converter=extract_props(websocket_tcp_converter),
+ user_agent_filter=extract_props(user_agent_filter),
+ policy=extract_props(policy),
)
result = self._client.http_client.patch(path, body_arg)
return HTTPSEdgeRoute(self._client, result)
@@ -2631,6 +2874,144 @@ Source code for ngrok.services
self._client.http_client.delete(path, body_arg)
+[docs]class EdgeRouteUserAgentFilterModuleClient(object):
+
def __init__(self, client):
+
self._client = client
+
+
[docs] def replace(
+
self,
+
edge_id: str,
+
id: str,
+
module: EndpointUserAgentFilter = None,
+
) -> EndpointUserAgentFilter:
+
"""
+
+
:param edge_id:
+
:param id:
+
:param module:
+
+
https://ngrok.com/docs/api#api-edge-route-user-agent-filter-module-replace
+
"""
+
path = "/edges/https/{edge_id}/routes/{id}/user_agent_filter"
+
path = path.format(
+
edge_id=edge_id,
+
id=id,
+
)
+
body_arg = extract_props(module)
+
result = self._client.http_client.put(path, body_arg)
+
return EndpointUserAgentFilter(self._client, result)
+
+
[docs] def get(
+
self,
+
edge_id: str,
+
id: str,
+
) -> EndpointUserAgentFilter:
+
"""
+
+
:param edge_id: unique identifier of this edge
+
:param id: unique identifier of this edge route
+
+
https://ngrok.com/docs/api#api-edge-route-user-agent-filter-module-get
+
"""
+
path = "/edges/https/{edge_id}/routes/{id}/user_agent_filter"
+
path = path.format(
+
edge_id=edge_id,
+
id=id,
+
)
+
body_arg = None
+
result = self._client.http_client.get(path, body_arg)
+
return EndpointUserAgentFilter(self._client, result)
+
+
[docs] def delete(
+
self,
+
edge_id: str,
+
id: str,
+
):
+
"""
+
+
:param edge_id: unique identifier of this edge
+
:param id: unique identifier of this edge route
+
+
https://ngrok.com/docs/api#api-edge-route-user-agent-filter-module-delete
+
"""
+
path = "/edges/https/{edge_id}/routes/{id}/user_agent_filter"
+
path = path.format(
+
edge_id=edge_id,
+
id=id,
+
)
+
body_arg = None
+
self._client.http_client.delete(path, body_arg)
+
+
+[docs]class EdgeRoutePolicyModuleClient(object):
+
def __init__(self, client):
+
self._client = client
+
+
[docs] def replace(
+
self,
+
edge_id: str,
+
id: str,
+
module: EndpointPolicy = None,
+
) -> EndpointPolicy:
+
"""
+
+
:param edge_id:
+
:param id:
+
:param module:
+
+
https://ngrok.com/docs/api#api-edge-route-policy-module-replace
+
"""
+
path = "/edges/https/{edge_id}/routes/{id}/policy"
+
path = path.format(
+
edge_id=edge_id,
+
id=id,
+
)
+
body_arg = extract_props(module)
+
result = self._client.http_client.put(path, body_arg)
+
return EndpointPolicy(self._client, result)
+
+
[docs] def get(
+
self,
+
edge_id: str,
+
id: str,
+
) -> EndpointPolicy:
+
"""
+
+
:param edge_id: unique identifier of this edge
+
:param id: unique identifier of this edge route
+
+
https://ngrok.com/docs/api#api-edge-route-policy-module-get
+
"""
+
path = "/edges/https/{edge_id}/routes/{id}/policy"
+
path = path.format(
+
edge_id=edge_id,
+
id=id,
+
)
+
body_arg = None
+
result = self._client.http_client.get(path, body_arg)
+
return EndpointPolicy(self._client, result)
+
+
[docs] def delete(
+
self,
+
edge_id: str,
+
id: str,
+
):
+
"""
+
+
:param edge_id: unique identifier of this edge
+
:param id: unique identifier of this edge route
+
+
https://ngrok.com/docs/api#api-edge-route-policy-module-delete
+
"""
+
path = "/edges/https/{edge_id}/routes/{id}/policy"
+
path = path.format(
+
edge_id=edge_id,
+
id=id,
+
)
+
body_arg = None
+
self._client.http_client.delete(path, body_arg)
+
+
[docs]class EdgesTCPClient(object):
def __init__(self, client):
self._client = client
@@ -2642,6 +3023,7 @@
Source code for ngrok.services
hostports: Sequence[str] = None,
backend: EndpointBackendMutate = None,
ip_restriction: EndpointIPPolicyMutate = None,
+ policy: EndpointPolicy = None,
) -> TCPEdge:
"""Create a TCP Edge
@@ -2650,6 +3032,7 @@ Source code for ngrok.services
:param hostports: hostports served by this edge
:param backend: edge modules
:param ip_restriction:
+ :param policy: the traffic policy associated with this edge or null
https://ngrok.com/docs/api#api-edges-tcp-create
"""
@@ -2660,6 +3043,7 @@ Source code for ngrok.services
hostports=hostports,
backend=extract_props(backend),
ip_restriction=extract_props(ip_restriction),
+ policy=extract_props(policy),
)
result = self._client.http_client.post(path, body_arg)
return TCPEdge(self._client, result)
@@ -2710,6 +3094,7 @@ Source code for ngrok.services
hostports: Sequence[str] = None,
backend: EndpointBackendMutate = None,
ip_restriction: EndpointIPPolicyMutate = None,
+ policy: EndpointPolicy = None,
) -> TCPEdge:
"""Updates a TCP Edge by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
@@ -2719,6 +3104,7 @@ Source code for ngrok.services
:param hostports: hostports served by this edge
:param backend: edge modules
:param ip_restriction:
+ :param policy: the traffic policy associated with this edge or null
https://ngrok.com/docs/api#api-edges-tcp-update
"""
@@ -2732,6 +3118,7 @@ Source code for ngrok.services
hostports=hostports,
backend=extract_props(backend),
ip_restriction=extract_props(ip_restriction),
+ policy=extract_props(policy),
)
result = self._client.http_client.patch(path, body_arg)
return TCPEdge(self._client, result)
@@ -2874,6 +3261,66 @@ Source code for ngrok.services
self._client.http_client.delete(path, body_arg)
+[docs]class TCPEdgePolicyModuleClient(object):
+
def __init__(self, client):
+
self._client = client
+
+
[docs] def replace(
+
self,
+
id: str,
+
module: EndpointPolicy = None,
+
) -> EndpointPolicy:
+
"""
+
+
:param id:
+
:param module:
+
+
https://ngrok.com/docs/api#api-tcp-edge-policy-module-replace
+
"""
+
path = "/edges/tcp/{id}/policy"
+
path = path.format(
+
id=id,
+
)
+
body_arg = extract_props(module)
+
result = self._client.http_client.put(path, body_arg)
+
return EndpointPolicy(self._client, result)
+
+
[docs] def get(
+
self,
+
id: str,
+
) -> EndpointPolicy:
+
"""
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-tcp-edge-policy-module-get
+
"""
+
path = "/edges/tcp/{id}/policy"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
result = self._client.http_client.get(path, body_arg)
+
return EndpointPolicy(self._client, result)
+
+
[docs] def delete(
+
self,
+
id: str,
+
):
+
"""
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-tcp-edge-policy-module-delete
+
"""
+
path = "/edges/tcp/{id}/policy"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
self._client.http_client.delete(path, body_arg)
+
+
[docs]class EdgesTLSClient(object):
def __init__(self, client):
self._client = client
@@ -2887,6 +3334,7 @@
Source code for ngrok.services
ip_restriction: EndpointIPPolicyMutate = None,
mutual_tls: EndpointMutualTLSMutate = None,
tls_termination: EndpointTLSTermination = None,
+ policy: EndpointPolicy = None,
) -> TLSEdge:
"""Create a TLS Edge
@@ -2897,6 +3345,7 @@ Source code for ngrok.services
:param ip_restriction:
:param mutual_tls:
:param tls_termination:
+ :param policy: the traffic policy associated with this edge or null
https://ngrok.com/docs/api#api-edges-tls-create
"""
@@ -2909,6 +3358,7 @@ Source code for ngrok.services
ip_restriction=extract_props(ip_restriction),
mutual_tls=extract_props(mutual_tls),
tls_termination=extract_props(tls_termination),
+ policy=extract_props(policy),
)
result = self._client.http_client.post(path, body_arg)
return TLSEdge(self._client, result)
@@ -2961,6 +3411,7 @@ Source code for ngrok.services
ip_restriction: EndpointIPPolicyMutate = None,
mutual_tls: EndpointMutualTLSMutate = None,
tls_termination: EndpointTLSTermination = None,
+ policy: EndpointPolicy = None,
) -> TLSEdge:
"""Updates a TLS Edge by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
@@ -2972,6 +3423,7 @@ Source code for ngrok.services
:param ip_restriction:
:param mutual_tls:
:param tls_termination:
+ :param policy: the traffic policy associated with this edge or null
https://ngrok.com/docs/api#api-edges-tls-update
"""
@@ -2987,6 +3439,7 @@ Source code for ngrok.services
ip_restriction=extract_props(ip_restriction),
mutual_tls=extract_props(mutual_tls),
tls_termination=extract_props(tls_termination),
+ policy=extract_props(policy),
)
result = self._client.http_client.patch(path, body_arg)
return TLSEdge(self._client, result)
@@ -3249,6 +3702,66 @@ Source code for ngrok.services
self._client.http_client.delete(path, body_arg)
+[docs]class TLSEdgePolicyModuleClient(object):
+
def __init__(self, client):
+
self._client = client
+
+
[docs] def replace(
+
self,
+
id: str,
+
module: EndpointPolicy = None,
+
) -> EndpointPolicy:
+
"""
+
+
:param id:
+
:param module:
+
+
https://ngrok.com/docs/api#api-tls-edge-policy-module-replace
+
"""
+
path = "/edges/tls/{id}/policy"
+
path = path.format(
+
id=id,
+
)
+
body_arg = extract_props(module)
+
result = self._client.http_client.put(path, body_arg)
+
return EndpointPolicy(self._client, result)
+
+
[docs] def get(
+
self,
+
id: str,
+
) -> EndpointPolicy:
+
"""
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-tls-edge-policy-module-get
+
"""
+
path = "/edges/tls/{id}/policy"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
result = self._client.http_client.get(path, body_arg)
+
return EndpointPolicy(self._client, result)
+
+
[docs] def delete(
+
self,
+
id: str,
+
):
+
"""
+
+
:param id: a resource identifier
+
+
https://ngrok.com/docs/api#api-tls-edge-policy-module-delete
+
"""
+
path = "/edges/tls/{id}/policy"
+
path = path.format(
+
id=id,
+
)
+
body_arg = None
+
self._client.http_client.delete(path, body_arg)
+
+
[docs]class EndpointsClient(object):
"""Endpoints provides an API for querying the endpoint objects
which define what tunnel or edge is used to serve a hostport.
@@ -4127,7 +4640,7 @@
Source code for ngrok.services
"""Create a new reserved domain.
:param domain: hostname of the reserved domain
- :param region: reserve the domain in this geographic ngrok datacenter. Optional, default is us. (au, eu, ap, us, jp, in, sa)
+ :param region: deprecated: With the launch of the ngrok Global Network domains traffic is now handled globally. This field applied only to endpoints. Note that agents may still connect to specific regions. Optional, null by default. (au, eu, ap, us, jp, in, sa)
:param description: human-readable description of what this reserved domain will be used for
:param metadata: arbitrary user-defined machine-readable data of this reserved domain. Optional, max 4096 bytes.
:param certificate_id: ID of a user-uploaded TLS certificate to use for connections to targeting this domain. Optional, mutually exclusive with ``certificate_management_policy``.
diff --git a/docs/_sources/bot_users.rst.txt b/docs/_sources/bot_users.rst.txt
new file mode 100644
index 0000000..85ee653
--- /dev/null
+++ b/docs/_sources/bot_users.rst.txt
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+Bot Users
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.bot_users` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: BotUsersClient
+ :undoc-members: BotUsersClient
diff --git a/docs/_sources/edge_route_policy_module.rst.txt b/docs/_sources/edge_route_policy_module.rst.txt
new file mode 100644
index 0000000..5b8222f
--- /dev/null
+++ b/docs/_sources/edge_route_policy_module.rst.txt
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+HTTPS Edge Route Policies Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.edge_route_policy_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: EdgeRoutePolicyModuleClient
+ :undoc-members: EdgeRoutePolicyModuleClient
diff --git a/docs/_sources/edge_route_user_agent_filter_module.rst.txt b/docs/_sources/edge_route_user_agent_filter_module.rst.txt
new file mode 100644
index 0000000..af22ce2
--- /dev/null
+++ b/docs/_sources/edge_route_user_agent_filter_module.rst.txt
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+HTTPS Edge Route User Agent Filter Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.edge_route_user_agent_filter_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: EdgeRouteUserAgentFilterModuleClient
+ :undoc-members: EdgeRouteUserAgentFilterModuleClient
diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt
index 1fce46a..e53f0af 100644
--- a/docs/_sources/index.rst.txt
+++ b/docs/_sources/index.rst.txt
@@ -131,8 +131,10 @@ API Reference
tunnel_sessions
failover_backends
http_response_backends
+ static_backends
tunnel_group_backends
weighted_backends
+ bot_users
certificate_authorities
credentials
edges_https_routes
@@ -150,14 +152,18 @@ API Reference
edge_route_saml_module
edge_route_oidc_module
edge_route_websocket_tcp_converter_module
+ edge_route_user_agent_filter_module
+ edge_route_policy_module
edges_tcp
tcp_edge_backend_module
tcp_edge_ip_restriction_module
+ tcp_edge_policy_module
edges_tls
tls_edge_backend_module
tls_edge_ip_restriction_module
tls_edge_mutual_tls_module
tls_edge_tls_termination_module
+ tls_edge_policy_module
endpoints
event_destinations
event_subscriptions
diff --git a/docs/_sources/static_backends.rst.txt b/docs/_sources/static_backends.rst.txt
new file mode 100644
index 0000000..dfddbd5
--- /dev/null
+++ b/docs/_sources/static_backends.rst.txt
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+Static Backends
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.static_backends` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: StaticBackendsClient
+ :undoc-members: StaticBackendsClient
diff --git a/docs/_sources/tcp_edge_policy_module.rst.txt b/docs/_sources/tcp_edge_policy_module.rst.txt
new file mode 100644
index 0000000..6a6a6c6
--- /dev/null
+++ b/docs/_sources/tcp_edge_policy_module.rst.txt
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+TCP Edge Policy Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.tcp_edge_policy_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: TCPEdgePolicyModuleClient
+ :undoc-members: TCPEdgePolicyModuleClient
diff --git a/docs/_sources/tls_edge_policy_module.rst.txt b/docs/_sources/tls_edge_policy_module.rst.txt
new file mode 100644
index 0000000..5f19264
--- /dev/null
+++ b/docs/_sources/tls_edge_policy_module.rst.txt
@@ -0,0 +1,12 @@
+..
+ Code generated for API Clients. DO NOT EDIT.
+
+TLS Edge Policy Module
+=====================================
+
+Do not construct this object directly, instead access the
+:attr:`~ngrok.Client.tls_edge_policy_module` property of an :class:`ngrok.Client` object.
+
+.. automodule:: ngrok.services
+ :members: TLSEdgePolicyModuleClient
+ :undoc-members: TLSEdgePolicyModuleClient
diff --git a/docs/abuse_reports.html b/docs/abuse_reports.html
index 9012b5a..7aa1221 100644
--- a/docs/abuse_reports.html
+++ b/docs/abuse_reports.html
@@ -170,8 +170,10 @@
Tunnel Sessions
Failover Backends
HTTP Response Backends
+
Static Backends
Tunnel Group Backends
Weighted Backends
+
Bot Users
Certificate Authorities
Tunnel Credentials
HTTPS Edge Routes
@@ -189,14 +191,18 @@
HTTPS Edge Route SAML Module
HTTPS Edge Route OIDC Module
HTTPS Edge Route Websocket TCP Converter Module
+
HTTPS Edge Route User Agent Filter Module
+
HTTPS Edge Route Policies Module
TCP Edges
TCP Edge Backend Module
TCP Edge IP Restriction Module
+
TCP Edge Policy Module
TLS Edges
TLS Edge Backend Module
TLS Edge IP Restriction Module
TLS Edge Mutual TLS Module
TLS Edge TLS Termination Module
+
TLS Edge Policy Module
Endpoints
Event Destinations
Event Subscriptions
diff --git a/docs/agent_ingresses.html b/docs/agent_ingresses.html
index dc58f60..758ec3a 100644
--- a/docs/agent_ingresses.html
+++ b/docs/agent_ingresses.html
@@ -170,8 +170,10 @@
Tunnel Sessions
Failover Backends
HTTP Response Backends
+
Static Backends
Tunnel Group Backends
Weighted Backends
+
Bot Users
Certificate Authorities
Tunnel Credentials
HTTPS Edge Routes
@@ -189,14 +191,18 @@
HTTPS Edge Route SAML Module
HTTPS Edge Route OIDC Module
HTTPS Edge Route Websocket TCP Converter Module
+
HTTPS Edge Route User Agent Filter Module
+
HTTPS Edge Route Policies Module
TCP Edges
TCP Edge Backend Module
TCP Edge IP Restriction Module
+
TCP Edge Policy Module
TLS Edges
TLS Edge Backend Module
TLS Edge IP Restriction Module
TLS Edge Mutual TLS Module
TLS Edge TLS Termination Module
+
TLS Edge Policy Module
Endpoints
Event Destinations
Event Subscriptions
@@ -263,7 +269,7 @@
Agent Ingresses