From d23d5dc95c9f2a593ed60693390e0ee321fde5c6 Mon Sep 17 00:00:00 2001 From: Alan Shreve Date: Sat, 18 Sep 2021 04:33:13 +0000 Subject: [PATCH] cut new release for ngrok-api-python --- README.md | 2 +- doc/source/event_sources.rst | 9 + doc/source/event_subscriptions.rst | 9 + doc/source/index.rst | 10 +- docs/_modules/index.html | 4 +- docs/_modules/ngrok/client.html | 82 +- docs/_modules/ngrok/datatypes.html | 2150 ++++++++++-------- docs/_modules/ngrok/error.html | 4 +- docs/_modules/ngrok/services.html | 687 ++++-- docs/_sources/event_sources.rst.txt | 9 + docs/_sources/event_subscriptions.rst.txt | 9 + docs/_sources/index.rst.txt | 10 +- docs/abuse_reports.html | 8 +- docs/api_keys.html | 11 +- docs/certificate_authorities.html | 11 +- docs/client.html | 118 +- docs/credentials.html | 16 +- docs/datatypes.html | 202 +- docs/endpoint_circuit_breaker_module.html | 4 +- docs/endpoint_compression_module.html | 4 +- docs/endpoint_configurations.html | 19 +- docs/endpoint_ip_policy_module.html | 4 +- docs/endpoint_logging_module.html | 10 +- docs/endpoint_mutual_tls_module.html | 4 +- docs/endpoint_o_auth_module.html | 4 +- docs/endpoint_oidc_module.html | 4 +- docs/endpoint_request_headers_module.html | 4 +- docs/endpoint_response_headers_module.html | 4 +- docs/endpoint_saml_module.html | 4 +- docs/endpoint_tls_termination_module.html | 4 +- docs/endpoint_webhook_validation_module.html | 4 +- docs/errors.html | 4 +- docs/event_destinations.html | 10 +- docs/event_sources.html | 317 +++ docs/event_streams.html | 10 +- docs/event_subscriptions.html | 319 +++ docs/genindex.html | 100 +- docs/index.html | 14 +- docs/ip_policies.html | 16 +- docs/ip_policy_rules.html | 8 +- docs/ip_restrictions.html | 16 +- docs/ip_whitelist.html | 14 +- docs/objects.inv | Bin 4759 -> 4978 bytes docs/py-modindex.html | 4 +- docs/reserved_addrs.html | 9 +- docs/reserved_domains.html | 16 +- docs/search.html | 4 +- docs/searchindex.js | 2 +- docs/ssh_certificate_authorities.html | 8 +- docs/ssh_credentials.html | 8 +- docs/ssh_host_certificates.html | 9 +- docs/ssh_user_certificates.html | 9 +- docs/tls_certificates.html | 11 +- docs/tunnel_sessions.html | 9 +- docs/tunnels.html | 8 +- ngrok/client.py | 78 +- ngrok/datatypes.py | 2142 +++++++++-------- ngrok/services.py | 683 ++++-- setup.py | 2 +- tests/test_ngrok.py | 84 +- 60 files changed, 5025 insertions(+), 2313 deletions(-) create mode 100644 doc/source/event_sources.rst create mode 100644 doc/source/event_subscriptions.rst create mode 100644 docs/_sources/event_sources.rst.txt create mode 100644 docs/_sources/event_subscriptions.rst.txt create mode 100644 docs/event_sources.html create mode 100644 docs/event_subscriptions.html diff --git a/README.md b/README.md index 41f9bcc..88bbf3e 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Please consult the [documentation](https://python-api.docs.ngrok.com) for additi ng = ngrok.Client("") # list all online tunnels - for t in ng.tunnels(): + for t in ng.tunnels.list(): print(t) # create an ip policy the allows traffic from some subnets diff --git a/doc/source/event_sources.rst b/doc/source/event_sources.rst new file mode 100644 index 0000000..f096cc0 --- /dev/null +++ b/doc/source/event_sources.rst @@ -0,0 +1,9 @@ +Event Sources +===================================== + +Do not construct this object directly, instead access the +:attr:`~ngrok.Client.event_sources` property of an :class:`ngrok.Client` object. + +.. automodule:: ngrok.services + :members: EventSourcesClient + :undoc-members: EventSourcesClient diff --git a/doc/source/event_subscriptions.rst b/doc/source/event_subscriptions.rst new file mode 100644 index 0000000..89bc463 --- /dev/null +++ b/doc/source/event_subscriptions.rst @@ -0,0 +1,9 @@ +Event Subscriptions +===================================== + +Do not construct this object directly, instead access the +:attr:`~ngrok.Client.event_subscriptions` property of an :class:`ngrok.Client` object. + +.. automodule:: ngrok.services + :members: EventSubscriptionsClient + :undoc-members: EventSubscriptionsClient diff --git a/doc/source/index.rst b/doc/source/index.rst index be95012..c5f3a85 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -41,10 +41,10 @@ object. That's it! policy = ng.ip_policies.create(action="allow") for cidr in ["24.0.0.0/8", "12.0.0.0/8"]: ng.ip_policy_rules.create(cidr=cidr, ip_policy_id=policy.id) - -Transparent Paging ------------------- + +Automatic Paging +---------------- The ngrok API pages all list resources but this library abstracts that away from you. All response objects from any ``list()`` methods return an object that @@ -120,13 +120,15 @@ API Reference api_keys certificate_authorities credentials + endpoint_configurations event_streams event_destinations + event_subscriptions + event_sources ip_policies ip_policy_rules ip_restrictions ip_whitelist - endpoint_configurations endpoint_logging_module endpoint_circuit_breaker_module endpoint_compression_module diff --git a/docs/_modules/index.html b/docs/_modules/index.html index 44f5c1b..a6b6260 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • diff --git a/docs/_modules/ngrok/client.html b/docs/_modules/ngrok/client.html index a2764d4..5068d5e 100644 --- a/docs/_modules/ngrok/client.html +++ b/docs/_modules/ngrok/client.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -174,20 +176,43 @@ @property def abuse_reports(self) -> AbuseReportsClient: + """Abuse Reports allow you to submit take-down requests for URLs hosted by + ngrok that violate ngrok's terms of service.""" return AbuseReportsClient(self) @property def api_keys(self) -> APIKeysClient: + """API Keys are used to authenticate to the `ngrok + API` <https://ngrok.com/docs/api#authentication>`_. You may use the API itself + to provision and manage API Keys but you'll need to provision your first API + key from the `API Keys page` <https://dashboard.ngrok.com/api/keys>`_ on your + ngrok.com dashboard.""" return APIKeysClient(self) @property def certificate_authorities(self) -> CertificateAuthoritiesClient: + """Certificate Authorities are x509 certificates that are used to sign other + x509 certificates. Attach a Certificate Authority to the Mutual TLS module + to verify that the TLS certificate presented by a client has been signed by + this CA. Certificate Authorities are used only for mTLS validation only and + thus a private key is not included in the resource.""" return CertificateAuthoritiesClient(self) @property def credentials(self) -> CredentialsClient: + """Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok + agent to connect the ngrok service as your account. They are installed with + the ``ngrok authtoken`` command or by specifying it in the ``ngrok.yml`` + configuration file with the ``authtoken`` property.""" return CredentialsClient(self) + @property + def endpoint_configurations(self) -> EndpointConfigurationsClient: + """Endpoint Configurations are a reusable group of modules that encapsulate how + traffic to a domain or address is handled. Endpoint configurations are only + applied to Domains and TCP Addresses they have been attached to.""" + return EndpointConfigurationsClient(self) + @property def event_streams(self) -> EventStreamsClient: return EventStreamsClient(self) @@ -196,62 +221,105 @@ def event_destinations(self) -> EventDestinationsClient: return EventDestinationsClient(self) + @property + def event_subscriptions(self) -> EventSubscriptionsClient: + return EventSubscriptionsClient(self) + + @property + def event_sources(self) -> EventSourcesClient: + return EventSourcesClient(self) + @property def ip_policies(self) -> IPPoliciesClient: + """IP Policies are reusable groups of CIDR ranges with an ``allow`` or ``deny`` + action. They can be attached to endpoints via the Endpoint Configuration IP + Policy module. They can also be used with IP Restrictions to control source + IP ranges that can start tunnel sessions and connect to the API and dashboard.""" return IPPoliciesClient(self) @property def ip_policy_rules(self) -> IPPolicyRulesClient: + """IP Policy Rules are the IPv4 or IPv6 CIDRs entries that + make up an IP Policy.""" return IPPolicyRulesClient(self) @property def ip_restrictions(self) -> IPRestrictionsClient: + """An IP restriction is a restriction placed on the CIDRs that are allowed to + initate traffic to a specific aspect of your ngrok account. An IP + restriction has a type which defines the ingress it applies to. IP + restrictions can be used to enforce the source IPs that can make API + requests, log in to the dashboard, start ngrok agents, and connect to your + public-facing endpoints.""" return IPRestrictionsClient(self) @property def ip_whitelist(self) -> IPWhitelistClient: + """The IP Whitelist is deprecated and will be removed. Use an IP Restriction + with an ``endpoints`` type instead.""" return IPWhitelistClient(self) - @property - def endpoint_configurations(self) -> EndpointConfigurationsClient: - """Endpoint Configuration managementAn `Endpoint Configuration` <https://ngrok.com/docs/ngrok-link#api-endpoint-configurations>`_ describes - a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!*""" - return EndpointConfigurationsClient(self) - @property def reserved_addrs(self) -> ReservedAddrsClient: + """Reserved Addresses are TCP addresses that can be used to listen for traffic. + TCP address hostnames and ports are assigned by ngrok, they cannot be + chosen.""" return ReservedAddrsClient(self) @property def reserved_domains(self) -> ReservedDomainsClient: + """Reserved Domains are hostnames that you can listen for traffic on. Domains + can be used to listen for http, https or tls traffic. You may use a domain + that you own by creating a CNAME record specified in the returned resource. + This CNAME record points traffic for that domain to ngrok's edge servers.""" return ReservedDomainsClient(self) @property def ssh_certificate_authorities(self) -> SSHCertificateAuthoritiesClient: + """An SSH Certificate Authority is a pair of an SSH Certificate and its private + key that can be used to sign other SSH host and user certificates.""" return SSHCertificateAuthoritiesClient(self) @property def ssh_credentials(self) -> SSHCredentialsClient: + """SSH Credentials are SSH public keys that can be used to start SSH tunnels + via the ngrok SSH tunnel gateway.""" return SSHCredentialsClient(self) @property def ssh_host_certificates(self) -> SSHHostCertificatesClient: + """SSH Host Certificates along with the corresponding private key allows an SSH + server to assert its authenticity to connecting SSH clients who trust the + SSH Certificate Authority that was used to sign the certificate.""" return SSHHostCertificatesClient(self) @property def ssh_user_certificates(self) -> SSHUserCertificatesClient: + """SSH User Certificates are presented by SSH clients when connecting to an SSH + server to authenticate their connection. The SSH server must trust the SSH + Certificate Authority used to sign the certificate.""" return SSHUserCertificatesClient(self) @property def tls_certificates(self) -> TLSCertificatesClient: + """TLS Certificates are pairs of x509 certificates and their matching private + key that can be used to terminate TLS traffic. TLS certificates are unused + until they are attached to a Domain. TLS Certificates may also be + provisioned by ngrok automatically for domains on which you have enabled + 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 + agent tunnel session or an SSH reverse tunnel session.""" return TunnelsClient(self) @property diff --git a/docs/_modules/ngrok/datatypes.html b/docs/_modules/ngrok/datatypes.html index 33fbcd3..771ae7c 100644 --- a/docs/_modules/ngrok/datatypes.html +++ b/docs/_modules/ngrok/datatypes.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -196,9 +198,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["hostnames"] = [ - AbuseReportHostname(client, x) for x in props["hostnames"] - ] + self._props["hostnames"] = ( + [AbuseReportHostname(client, x) for x in props["hostnames"]] + if props["hostnames"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -337,7 +341,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["keys"] = [APIKey(client, x) for x in props["keys"]] + self._props["keys"] = ( + [APIKey(client, x) for x in props["keys"]] + if props["keys"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -459,9 +467,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["certificate_authorities"] = [ - CertificateAuthority(client, x) for x in props["certificate_authorities"] - ] + self._props["certificate_authorities"] = ( + [CertificateAuthority(client, x) for x in props["certificate_authorities"]] + if props["certificate_authorities"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -565,9 +575,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["credentials"] = [ - Credential(client, x) for x in props["credentials"] - ] + self._props["credentials"] = ( + [Credential(client, x) for x in props["credentials"]] + if props["credentials"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -597,835 +609,66 @@ return self._props["next_page_uri"] -
    [docs]class EventStreamList(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["event_streams"] = [ - EventStream(client, x) for x in props["event_streams"] - ] - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<EventStreamList {} {}>".format(self.id, repr(self._props)) - else: - return "<EventStreamList {}>".format(repr(self._props)) - - def __iter__(self): - return PagedIterator(self._client, self, "event_streams") - - @property - def event_streams(self) -> Sequence[EventStream]: - """The list of all Event Streams on this account.""" - return self._props["event_streams"] - - @property - def uri(self) -> str: - """URI of the Event Stream 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 EventStream(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 "<EventStream {} {}>".format(self.id, repr(self._props)) - else: - return "<EventStream {}>".format(repr(self._props)) - -
    [docs] def delete( - self, - ): - self._client.event_streams.delete( - id=self.id, - )
    - -
    [docs] def update( - self, - metadata: str = None, - description: str = None, - fields: Sequence[str] = None, - destination_ids: Sequence[str] = None, - sampling_rate: float = None, - ): - self._client.event_streams.update( - id=self.id, - metadata=metadata, - description=description, - fields=fields, - destination_ids=destination_ids, - sampling_rate=sampling_rate, - )
    - - @property - def id(self) -> str: - """Unique identifier for this Event Stream.""" - return self._props["id"] - - @property - def uri(self) -> str: - """URI of the Event Stream API resource.""" - return self._props["uri"] - - @property - def created_at(self) -> str: - """Timestamp when the Event Stream was created, RFC 3339 format.""" - return self._props["created_at"] - - @property - def metadata(self) -> str: - """Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.""" - return self._props["metadata"] - - @property - def description(self) -> str: - """Human-readable description of the Event Stream. Optional, max 255 bytes.""" - return self._props["description"] - - @property - def fields(self) -> Sequence[str]: - """A list of protocol-specific fields you want to collect on each event.""" - return self._props["fields"] - - @property - def event_type(self) -> str: - """The protocol that determines which events will be collected. Supported values are ``tcp_connection_closed`` and ``http_request_complete``.""" - return self._props["event_type"] - - @property - def destination_ids(self) -> Sequence[str]: - """A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination.""" - return self._props["destination_ids"] - - @property - def sampling_rate(self) -> float: - """The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events.""" - return self._props["sampling_rate"]
    - - -
    [docs]class EventDestination(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["target"] = EventTarget(client, props["target"]) - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<EventDestination {} {}>".format(self.id, repr(self._props)) - else: - return "<EventDestination {}>".format(repr(self._props)) - -
    [docs] def delete( - self, - ): - self._client.event_destinations.delete( - id=self.id, - )
    - - @property - def id(self) -> str: - """Unique identifier for this Event Destination.""" - return self._props["id"] - - @property - def metadata(self) -> str: - """Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.""" - return self._props["metadata"] - - @property - def created_at(self) -> str: - """Timestamp when the Event Destination was created, RFC 3339 format.""" - return self._props["created_at"] - - @property - def description(self) -> str: - """Human-readable description of the Event Destination. Optional, max 255 bytes.""" - return self._props["description"] - - @property - def format(self) -> str: - """The output format you would like to serialize events into when sending to their target. Currently the only accepted value is ``JSON``.""" - return self._props["format"] - - @property - def target(self) -> EventTarget: - """An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: ``kinesis``, ``firehose``, ``cloudwatch_logs``, or ``s3``.""" - return self._props["target"] - - @property - def uri(self) -> str: - """URI of the Event Destination API resource.""" - return self._props["uri"]
    - - -
    [docs]class EventDestinationList(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["event_destinations"] = [ - EventDestination(client, x) for x in props["event_destinations"] - ] - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<EventDestinationList {} {}>".format(self.id, repr(self._props)) - else: - return "<EventDestinationList {}>".format(repr(self._props)) - - def __iter__(self): - return PagedIterator(self._client, self, "event_destinations") - - @property - def event_destinations(self) -> Sequence[EventDestination]: - """The list of all Event Destinations on this account.""" - return self._props["event_destinations"] - - @property - def uri(self) -> str: - """URI of the Event Destinations 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 EventTarget(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["firehose"] = EventTargetFirehose(client, props["firehose"]) - self._props["kinesis"] = EventTargetKinesis(client, props["kinesis"]) - self._props["cloudwatch_logs"] = EventTargetCloudwatchLogs( - client, props["cloudwatch_logs"] - ) - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<EventTarget {} {}>".format(self.id, repr(self._props)) - else: - return "<EventTarget {}>".format(repr(self._props)) - - @property - def firehose(self) -> EventTargetFirehose: - """Configuration used to send events to Amazon Kinesis Data Firehose.""" - return self._props["firehose"] - - @property - def kinesis(self) -> EventTargetKinesis: - """Configuration used to send events to Amazon Kinesis.""" - return self._props["kinesis"] - - @property - def cloudwatch_logs(self) -> EventTargetCloudwatchLogs: - """Configuration used to send events to Amazon CloudWatch Logs.""" - return self._props["cloudwatch_logs"]
    - - -
    [docs]class EventTargetFirehose(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["auth"] = AWSAuth(client, props["auth"]) - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<EventTargetFirehose {} {}>".format(self.id, repr(self._props)) - else: - return "<EventTargetFirehose {}>".format(repr(self._props)) - - @property - def auth(self) -> AWSAuth: - """Configuration for how to authenticate into your AWS account. Exactly one of ``role`` or ``creds`` should be configured.""" - return self._props["auth"] - - @property - def delivery_stream_arn(self) -> str: - """An Amazon Resource Name specifying the Firehose delivery stream to deposit events into.""" - return self._props["delivery_stream_arn"]
    - - -
    [docs]class EventTargetKinesis(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["auth"] = AWSAuth(client, props["auth"]) - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<EventTargetKinesis {} {}>".format(self.id, repr(self._props)) - else: - return "<EventTargetKinesis {}>".format(repr(self._props)) - - @property - def auth(self) -> AWSAuth: - """Configuration for how to authenticate into your AWS account. Exactly one of ``role`` or ``creds`` should be configured.""" - return self._props["auth"] - - @property - def stream_arn(self) -> str: - """An Amazon Resource Name specifying the Kinesis stream to deposit events into.""" - return self._props["stream_arn"]
    - - -
    [docs]class EventTargetCloudwatchLogs(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["auth"] = AWSAuth(client, props["auth"]) - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<EventTargetCloudwatchLogs {} {}>".format( - self.id, repr(self._props) - ) - else: - return "<EventTargetCloudwatchLogs {}>".format(repr(self._props)) - - @property - def auth(self) -> AWSAuth: - """Configuration for how to authenticate into your AWS account. Exactly one of ``role`` or ``creds`` should be configured.""" - return self._props["auth"] - - @property - def log_group_arn(self) -> str: - """An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.""" - return self._props["log_group_arn"]
    - - -
    [docs]class AWSAuth(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["role"] = AWSRole(client, props["role"]) - self._props["creds"] = AWSCredentials(client, props["creds"]) - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<AWSAuth {} {}>".format(self.id, repr(self._props)) - else: - return "<AWSAuth {}>".format(repr(self._props)) - - @property - def role(self) -> AWSRole: - """A role for ngrok to assume on your behalf to deposit events into your AWS account.""" - return self._props["role"] - - @property - def creds(self) -> AWSCredentials: - """Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys.""" - return self._props["creds"]
    - - -
    [docs]class AWSRole(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 "<AWSRole {} {}>".format(self.id, repr(self._props)) - else: - return "<AWSRole {}>".format(repr(self._props)) - - @property - def role_arn(self) -> str: - """An ARN that specifies the role that ngrok should use to deliver to the configured target.""" - return self._props["role_arn"]
    - - -
    [docs]class AWSCredentials(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 "<AWSCredentials {} {}>".format(self.id, repr(self._props)) - else: - return "<AWSCredentials {}>".format(repr(self._props)) - - @property - def aws_access_key_id(self) -> str: - """The ID portion of an AWS access key.""" - return self._props["aws_access_key_id"] - - @property - def aws_secret_access_key(self) -> str: - """The secret portion of an AWS access key.""" - return self._props["aws_secret_access_key"]
    - - -
    [docs]class IPPolicy(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 "<IPPolicy {} {}>".format(self.id, repr(self._props)) - else: - return "<IPPolicy {}>".format(repr(self._props)) - -
    [docs] def delete( - self, - ): - self._client.ip_policies.delete( - id=self.id, - )
    - -
    [docs] def update( - self, - description: str = None, - metadata: str = None, - ): - self._client.ip_policies.update( - id=self.id, - description=description, - metadata=metadata, - )
    - - @property - def id(self) -> str: - """unique identifier for this IP policy""" - return self._props["id"] - - @property - def uri(self) -> str: - """URI of the IP Policy API resource""" - return self._props["uri"] - - @property - def created_at(self) -> str: - """timestamp when the IP policy was created, RFC 3339 format""" - return self._props["created_at"] - - @property - def description(self) -> str: - """human-readable description of the source IPs of this IP policy. optional, max 255 bytes.""" - return self._props["description"] - - @property - def metadata(self) -> str: - """arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.""" - return self._props["metadata"] - - @property - def action(self) -> str: - """the IP policy action. Supported values are ``allow`` or ``deny``""" - return self._props["action"]
    - - -
    [docs]class IPPolicyList(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["ip_policies"] = [IPPolicy(client, x) for x in props["ip_policies"]] - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<IPPolicyList {} {}>".format(self.id, repr(self._props)) - else: - return "<IPPolicyList {}>".format(repr(self._props)) - - def __iter__(self): - return PagedIterator(self._client, self, "ip_policies") - - @property - def ip_policies(self) -> Sequence[IPPolicy]: - """the list of all IP policies on this account""" - return self._props["ip_policies"] - - @property - def uri(self) -> str: - """URI of the IP policy 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 IPPolicyRule(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["ip_policy"] = Ref(client, props["ip_policy"]) - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<IPPolicyRule {} {}>".format(self.id, repr(self._props)) - else: - return "<IPPolicyRule {}>".format(repr(self._props)) - -
    [docs] def delete( - self, - ): - self._client.ip_policy_rules.delete( - id=self.id, - )
    - -
    [docs] def update( - self, - description: str = None, - metadata: str = None, - cidr: str = None, - ): - self._client.ip_policy_rules.update( - id=self.id, - description=description, - metadata=metadata, - cidr=cidr, - )
    - - @property - def id(self) -> str: - """unique identifier for this IP policy rule""" - return self._props["id"] - - @property - def uri(self) -> str: - """URI of the IP policy rule API resource""" - return self._props["uri"] - - @property - def created_at(self) -> str: - """timestamp when the IP policy rule was created, RFC 3339 format""" - return self._props["created_at"] - - @property - def description(self) -> str: - """human-readable description of the source IPs of this IP rule. optional, max 255 bytes.""" - return self._props["description"] - - @property - def metadata(self) -> str: - """arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.""" - return self._props["metadata"] - - @property - def cidr(self) -> str: - """an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.""" - return self._props["cidr"] - - @property - def ip_policy(self) -> Ref: - """object describing the IP policy this IP Policy Rule belongs to""" - return self._props["ip_policy"]
    - - -
    [docs]class IPPolicyRuleList(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["ip_policy_rules"] = [ - IPPolicyRule(client, x) for x in props["ip_policy_rules"] - ] - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<IPPolicyRuleList {} {}>".format(self.id, repr(self._props)) - else: - return "<IPPolicyRuleList {}>".format(repr(self._props)) - - def __iter__(self): - return PagedIterator(self._client, self, "ip_policy_rules") - - @property - def ip_policy_rules(self) -> Sequence[IPPolicyRule]: - """the list of all IP policy rules on this account""" - return self._props["ip_policy_rules"] - - @property - def uri(self) -> str: - """URI of the IP policy rule 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 IPRestriction(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["ip_policies"] = [Ref(client, x) for x in props["ip_policies"]] - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<IPRestriction {} {}>".format(self.id, repr(self._props)) - else: - return "<IPRestriction {}>".format(repr(self._props)) - -
    [docs] def delete( - self, - ): - self._client.ip_restrictions.delete( - id=self.id, - )
    - - @property - def id(self) -> str: - """unique identifier for this IP restriction""" - return self._props["id"] - - @property - def uri(self) -> str: - """URI of the IP restriction API resource""" - return self._props["uri"] - - @property - def created_at(self) -> str: - """timestamp when the IP restriction was created, RFC 3339 format""" - return self._props["created_at"] - - @property - def description(self) -> str: - """human-readable description of this IP restriction. optional, max 255 bytes.""" - return self._props["description"] - - @property - def metadata(self) -> str: - """arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.""" - return self._props["metadata"] - - @property - def enforced(self) -> bool: - """true if the IP restriction will be enforce. if false, only warnings will be issued""" - return self._props["enforced"] - - @property - def type(self) -> str: - """the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: ``dashboard``, ``api``, ``agent``, and ``endpoints``""" - return self._props["type"] - - @property - def ip_policies(self) -> Sequence[Ref]: - """the set of IP policies that are used to enforce the restriction""" - return self._props["ip_policies"]
    - - -
    [docs]class IPRestrictionList(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["ip_restrictions"] = [ - IPRestriction(client, x) for x in props["ip_restrictions"] - ] - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<IPRestrictionList {} {}>".format(self.id, repr(self._props)) - else: - return "<IPRestrictionList {}>".format(repr(self._props)) - - def __iter__(self): - return PagedIterator(self._client, self, "ip_restrictions") - - @property - def ip_restrictions(self) -> Sequence[IPRestriction]: - """the list of all IP restrictions on this account""" - return self._props["ip_restrictions"] - - @property - def uri(self) -> str: - """URI of the IP resrtrictions 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 IPWhitelistEntry(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 "<IPWhitelistEntry {} {}>".format(self.id, repr(self._props)) - else: - return "<IPWhitelistEntry {}>".format(repr(self._props)) - -
    [docs] def delete( - self, - ): - self._client.ip_whitelist.delete( - id=self.id, - )
    - -
    [docs] def update( - self, - description: str = None, - metadata: str = None, - ): - self._client.ip_whitelist.update( - id=self.id, - description=description, - metadata=metadata, - )
    - - @property - def id(self) -> str: - """unique identifier for this IP whitelist entry""" - return self._props["id"] - - @property - def uri(self) -> str: - """URI of the IP whitelist entry API resource""" - return self._props["uri"] - - @property - def created_at(self) -> str: - """timestamp when the IP whitelist entry was created, RFC 3339 format""" - return self._props["created_at"] - - @property - def description(self) -> str: - """human-readable description of the source IPs for this IP whitelist entry. optional, max 255 bytes.""" - return self._props["description"] - - @property - def metadata(self) -> str: - """arbitrary user-defined machine-readable data of this IP whitelist entry. optional, max 4096 bytes.""" - return self._props["metadata"] - - @property - def ip_net(self) -> str: - """an IP address or IP network range in CIDR notation (e.g. 10.1.1.1 or 10.1.0.0/16) of addresses that will be whitelisted to communicate with your tunnel endpoints""" - return self._props["ip_net"]
    - - -
    [docs]class IPWhitelistEntryList(object): - def __init__(self, client, props): - self._client = client - self._props = props - self._props["whitelist"] = [ - IPWhitelistEntry(client, x) for x in props["whitelist"] - ] - - def __eq__(self, other): - return self._props == other._props - - def __str__(self): - if "id" in self._props: - return "<IPWhitelistEntryList {} {}>".format(self.id, repr(self._props)) - else: - return "<IPWhitelistEntryList {}>".format(repr(self._props)) - - def __iter__(self): - return PagedIterator(self._client, self, "whitelist") - - @property - def whitelist(self) -> Sequence[IPWhitelistEntry]: - """the list of all IP whitelist entries on this account""" - return self._props["whitelist"] - - @property - def uri(self) -> str: - """URI of the IP whitelist 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 EndpointConfiguration(object): def __init__(self, client, props): self._client = client self._props = props - self._props["circuit_breaker"] = EndpointCircuitBreaker( - client, props["circuit_breaker"] + self._props["circuit_breaker"] = ( + EndpointCircuitBreaker(client, props["circuit_breaker"]) + if props["circuit_breaker"] is not None + else None ) - self._props["compression"] = EndpointCompression(client, props["compression"]) - self._props["request_headers"] = EndpointRequestHeaders( - client, props["request_headers"] + self._props["compression"] = ( + EndpointCompression(client, props["compression"]) + if props["compression"] is not None + else None ) - self._props["response_headers"] = EndpointResponseHeaders( - client, props["response_headers"] + self._props["request_headers"] = ( + EndpointRequestHeaders(client, props["request_headers"]) + if props["request_headers"] is not None + else None ) - self._props["ip_policy"] = EndpointIPPolicy(client, props["ip_policy"]) - self._props["mutual_tls"] = EndpointMutualTLS(client, props["mutual_tls"]) - self._props["tls_termination"] = EndpointTLSTermination( - client, props["tls_termination"] + self._props["response_headers"] = ( + EndpointResponseHeaders(client, props["response_headers"]) + if props["response_headers"] is not None + else None ) - self._props["webhook_validation"] = EndpointWebhookValidation( - client, props["webhook_validation"] + self._props["ip_policy"] = ( + EndpointIPPolicy(client, props["ip_policy"]) + if props["ip_policy"] is not None + else None + ) + self._props["mutual_tls"] = ( + EndpointMutualTLS(client, props["mutual_tls"]) + if props["mutual_tls"] is not None + else None + ) + self._props["tls_termination"] = ( + EndpointTLSTermination(client, props["tls_termination"]) + if props["tls_termination"] is not None + else None + ) + self._props["webhook_validation"] = ( + EndpointWebhookValidation(client, props["webhook_validation"]) + if props["webhook_validation"] is not None + else None + ) + self._props["oauth"] = ( + EndpointOAuth(client, props["oauth"]) + if props["oauth"] is not None + else None + ) + self._props["logging"] = ( + EndpointLogging(client, props["logging"]) + if props["logging"] is not None + else None + ) + self._props["saml"] = ( + EndpointSAML(client, props["saml"]) if props["saml"] is not None else None + ) + self._props["oidc"] = ( + EndpointOIDC(client, props["oidc"]) if props["oidc"] is not None else None ) - self._props["oauth"] = EndpointOAuth(client, props["oauth"]) - self._props["logging"] = EndpointLogging(client, props["logging"]) - self._props["saml"] = EndpointSAML(client, props["saml"]) - self._props["oidc"] = EndpointOIDC(client, props["oidc"]) def __eq__(self, other): return self._props == other._props @@ -1573,9 +816,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["endpoint_configurations"] = [ - EndpointConfiguration(client, x) for x in props["endpoint_configurations"] - ] + self._props["endpoint_configurations"] = ( + [EndpointConfiguration(client, x) for x in props["endpoint_configurations"]] + if props["endpoint_configurations"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -1630,7 +875,7 @@ @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: ``SLACK``, ``SNS``, ``STRIPE``, ``GITHUB``, ``TWILIO``, ``SHOPIFY``, ``GITLAB``, ``INTERCOM``.""" + """a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers: ``SLACK``, ``SNS``, ``STRIPE``, ``GITHUB``, ``TWILIO``, ``SHOPIFY``, ``GITLAB``, ``INTERCOM``, ``SENDGRID``.""" return self._props["provider"] @property @@ -1663,9 +908,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["certificate_authorities"] = [ - Ref(client, x) for x in props["certificate_authorities"] - ] + self._props["certificate_authorities"] = ( + [Ref(client, x) for x in props["certificate_authorities"]] + if props["certificate_authorities"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -1746,7 +993,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["event_streams"] = [Ref(client, x) for x in props["event_streams"]] + self._props["event_streams"] = ( + [Ref(client, x) for x in props["event_streams"]] + if props["event_streams"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -1857,7 +1108,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["ip_policies"] = [Ref(client, x) for x in props["ip_policies"]] + self._props["ip_policies"] = ( + [Ref(client, x) for x in props["ip_policies"]] + if props["ip_policies"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -1952,7 +1207,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["provider"] = EndpointOAuthProvider(client, props["provider"]) + self._props["provider"] = ( + EndpointOAuthProvider(client, props["provider"]) + if props["provider"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -2003,10 +1262,26 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["github"] = EndpointOAuthGitHub(client, props["github"]) - self._props["facebook"] = EndpointOAuthFacebook(client, props["facebook"]) - self._props["microsoft"] = EndpointOAuthMicrosoft(client, props["microsoft"]) - self._props["google"] = EndpointOAuthGoogle(client, props["google"]) + self._props["github"] = ( + EndpointOAuthGitHub(client, props["github"]) + if props["github"] is not None + else None + ) + self._props["facebook"] = ( + EndpointOAuthFacebook(client, props["facebook"]) + if props["facebook"] is not None + else None + ) + self._props["microsoft"] = ( + EndpointOAuthMicrosoft(client, props["microsoft"]) + if props["microsoft"] is not None + else None + ) + self._props["google"] = ( + EndpointOAuthGoogle(client, props["google"]) + if props["google"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -2290,7 +1565,12 @@ @property def metadata_url(self) -> str: """A public URL where the SP's metadata is hosted. If an IdP supports dynamic configuration, this is the URL it can use to retrieve the SP metadata.""" - return self._props["metadata_url"]
    + return self._props["metadata_url"] + + @property + def nameid_format(self) -> str: + """Defines the name identifier format the SP expects the IdP to use in its assertions to identify subjects. If unspecified, a default value of ``urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`` will be used. A subset of the allowed values enumerated by the SAML specification are supported.""" + return self._props["nameid_format"]
    [docs]class EndpointSAMLMutate(object): @@ -2350,7 +1630,12 @@ @property def authorized_groups(self) -> Sequence[str]: """If present, only users who are a member of one of the listed groups may access the target endpoint.""" - return self._props["authorized_groups"]
    + return self._props["authorized_groups"] + + @property + def nameid_format(self) -> str: + """Defines the name identifier format the SP expects the IdP to use in its assertions to identify subjects. If unspecified, a default value of ``urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`` will be used. A subset of the allowed values enumerated by the SAML specification are supported.""" + return self._props["nameid_format"]
    [docs]class EndpointOIDC(object): @@ -2413,12 +1698,1043 @@ return self._props["scopes"]
    +
    [docs]class EventStreamList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["event_streams"] = ( + [EventStream(client, x) for x in props["event_streams"]] + if props["event_streams"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventStreamList {} {}>".format(self.id, repr(self._props)) + else: + return "<EventStreamList {}>".format(repr(self._props)) + + def __iter__(self): + return PagedIterator(self._client, self, "event_streams") + + @property + def event_streams(self) -> Sequence[EventStream]: + """The list of all Event Streams on this account.""" + return self._props["event_streams"] + + @property + def uri(self) -> str: + """URI of the Event Stream 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 EventStream(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 "<EventStream {} {}>".format(self.id, repr(self._props)) + else: + return "<EventStream {}>".format(repr(self._props)) + +
    [docs] def delete( + self, + ): + self._client.event_streams.delete( + id=self.id, + )
    + +
    [docs] def update( + self, + metadata: str = None, + description: str = None, + fields: Sequence[str] = None, + destination_ids: Sequence[str] = None, + sampling_rate: float = None, + ): + self._client.event_streams.update( + id=self.id, + metadata=metadata, + description=description, + fields=fields, + destination_ids=destination_ids, + sampling_rate=sampling_rate, + )
    + + @property + def id(self) -> str: + """Unique identifier for this Event Stream.""" + return self._props["id"] + + @property + def uri(self) -> str: + """URI of the Event Stream API resource.""" + return self._props["uri"] + + @property + def created_at(self) -> str: + """Timestamp when the Event Stream was created, RFC 3339 format.""" + return self._props["created_at"] + + @property + def metadata(self) -> str: + """Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.""" + return self._props["metadata"] + + @property + def description(self) -> str: + """Human-readable description of the Event Stream. Optional, max 255 bytes.""" + return self._props["description"] + + @property + def fields(self) -> Sequence[str]: + """A list of protocol-specific fields you want to collect on each event.""" + return self._props["fields"] + + @property + def event_type(self) -> str: + """The protocol that determines which events will be collected. Supported values are ``tcp_connection_closed`` and ``http_request_complete``.""" + return self._props["event_type"] + + @property + def destination_ids(self) -> Sequence[str]: + """A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination.""" + return self._props["destination_ids"] + + @property + def sampling_rate(self) -> float: + """The percentage of all events you would like to capture. Valid values range from 0.01, representing 1% of all events to 1.00, representing 100% of all events.""" + return self._props["sampling_rate"]
    + + +
    [docs]class EventDestination(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["target"] = ( + EventTarget(client, props["target"]) + if props["target"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventDestination {} {}>".format(self.id, repr(self._props)) + else: + return "<EventDestination {}>".format(repr(self._props)) + +
    [docs] def delete( + self, + ): + self._client.event_destinations.delete( + id=self.id, + )
    + + @property + def id(self) -> str: + """Unique identifier for this Event Destination.""" + return self._props["id"] + + @property + def metadata(self) -> str: + """Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.""" + return self._props["metadata"] + + @property + def created_at(self) -> str: + """Timestamp when the Event Destination was created, RFC 3339 format.""" + return self._props["created_at"] + + @property + def description(self) -> str: + """Human-readable description of the Event Destination. Optional, max 255 bytes.""" + return self._props["description"] + + @property + def format(self) -> str: + """The output format you would like to serialize events into when sending to their target. Currently the only accepted value is ``JSON``.""" + return self._props["format"] + + @property + def target(self) -> EventTarget: + """An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: ``kinesis``, ``firehose``, ``cloudwatch_logs``, or ``s3``.""" + return self._props["target"] + + @property + def uri(self) -> str: + """URI of the Event Destination API resource.""" + return self._props["uri"]
    + + +
    [docs]class EventDestinationList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["event_destinations"] = ( + [EventDestination(client, x) for x in props["event_destinations"]] + if props["event_destinations"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventDestinationList {} {}>".format(self.id, repr(self._props)) + else: + return "<EventDestinationList {}>".format(repr(self._props)) + + def __iter__(self): + return PagedIterator(self._client, self, "event_destinations") + + @property + def event_destinations(self) -> Sequence[EventDestination]: + """The list of all Event Destinations on this account.""" + return self._props["event_destinations"] + + @property + def uri(self) -> str: + """URI of the Event Destinations 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 EventTarget(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["firehose"] = ( + EventTargetFirehose(client, props["firehose"]) + if props["firehose"] is not None + else None + ) + self._props["kinesis"] = ( + EventTargetKinesis(client, props["kinesis"]) + if props["kinesis"] is not None + else None + ) + self._props["cloudwatch_logs"] = ( + EventTargetCloudwatchLogs(client, props["cloudwatch_logs"]) + if props["cloudwatch_logs"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventTarget {} {}>".format(self.id, repr(self._props)) + else: + return "<EventTarget {}>".format(repr(self._props)) + + @property + def firehose(self) -> EventTargetFirehose: + """Configuration used to send events to Amazon Kinesis Data Firehose.""" + return self._props["firehose"] + + @property + def kinesis(self) -> EventTargetKinesis: + """Configuration used to send events to Amazon Kinesis.""" + return self._props["kinesis"] + + @property + def cloudwatch_logs(self) -> EventTargetCloudwatchLogs: + """Configuration used to send events to Amazon CloudWatch Logs.""" + return self._props["cloudwatch_logs"]
    + + +
    [docs]class EventTargetFirehose(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["auth"] = ( + AWSAuth(client, props["auth"]) if props["auth"] is not None else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventTargetFirehose {} {}>".format(self.id, repr(self._props)) + else: + return "<EventTargetFirehose {}>".format(repr(self._props)) + + @property + def auth(self) -> AWSAuth: + """Configuration for how to authenticate into your AWS account. Exactly one of ``role`` or ``creds`` should be configured.""" + return self._props["auth"] + + @property + def delivery_stream_arn(self) -> str: + """An Amazon Resource Name specifying the Firehose delivery stream to deposit events into.""" + return self._props["delivery_stream_arn"]
    + + +
    [docs]class EventTargetKinesis(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["auth"] = ( + AWSAuth(client, props["auth"]) if props["auth"] is not None else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventTargetKinesis {} {}>".format(self.id, repr(self._props)) + else: + return "<EventTargetKinesis {}>".format(repr(self._props)) + + @property + def auth(self) -> AWSAuth: + """Configuration for how to authenticate into your AWS account. Exactly one of ``role`` or ``creds`` should be configured.""" + return self._props["auth"] + + @property + def stream_arn(self) -> str: + """An Amazon Resource Name specifying the Kinesis stream to deposit events into.""" + return self._props["stream_arn"]
    + + +
    [docs]class EventTargetCloudwatchLogs(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["auth"] = ( + AWSAuth(client, props["auth"]) if props["auth"] is not None else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventTargetCloudwatchLogs {} {}>".format( + self.id, repr(self._props) + ) + else: + return "<EventTargetCloudwatchLogs {}>".format(repr(self._props)) + + @property + def auth(self) -> AWSAuth: + """Configuration for how to authenticate into your AWS account. Exactly one of ``role`` or ``creds`` should be configured.""" + return self._props["auth"] + + @property + def log_group_arn(self) -> str: + """An Amazon Resource Name specifying the CloudWatch Logs group to deposit events into.""" + return self._props["log_group_arn"]
    + + +
    [docs]class AWSAuth(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["role"] = ( + AWSRole(client, props["role"]) if props["role"] is not None else None + ) + self._props["creds"] = ( + AWSCredentials(client, props["creds"]) + if props["creds"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<AWSAuth {} {}>".format(self.id, repr(self._props)) + else: + return "<AWSAuth {}>".format(repr(self._props)) + + @property + def role(self) -> AWSRole: + """A role for ngrok to assume on your behalf to deposit events into your AWS account.""" + return self._props["role"] + + @property + def creds(self) -> AWSCredentials: + """Credentials to your AWS account if you prefer ngrok to sign in with long-term access keys.""" + return self._props["creds"]
    + + +
    [docs]class AWSRole(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 "<AWSRole {} {}>".format(self.id, repr(self._props)) + else: + return "<AWSRole {}>".format(repr(self._props)) + + @property + def role_arn(self) -> str: + """An ARN that specifies the role that ngrok should use to deliver to the configured target.""" + return self._props["role_arn"]
    + + +
    [docs]class AWSCredentials(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 "<AWSCredentials {} {}>".format(self.id, repr(self._props)) + else: + return "<AWSCredentials {}>".format(repr(self._props)) + + @property + def aws_access_key_id(self) -> str: + """The ID portion of an AWS access key.""" + return self._props["aws_access_key_id"] + + @property + def aws_secret_access_key(self) -> str: + """The secret portion of an AWS access key.""" + return self._props["aws_secret_access_key"]
    + + +
    [docs]class EventSubscriptionList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["event_subscriptions"] = ( + [EventSubscription(client, x) for x in props["event_subscriptions"]] + if props["event_subscriptions"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventSubscriptionList {} {}>".format(self.id, repr(self._props)) + else: + return "<EventSubscriptionList {}>".format(repr(self._props)) + + def __iter__(self): + return PagedIterator(self._client, self, "event_subscriptions") + + @property + def event_subscriptions(self) -> Sequence[EventSubscription]: + """The list of all Event Subscriptions on this account.""" + return self._props["event_subscriptions"] + + @property + def uri(self) -> str: + """URI of the Event Subscriptions list API resource.""" + return self._props["uri"] + + @property + def next_page_uri(self) -> str: + """URI of next page, or null if there is no next page.""" + return self._props["next_page_uri"]
    + + +
    [docs]class EventSubscription(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["sources"] = ( + [EventSource(client, x) for x in props["sources"]] + if props["sources"] is not None + else None + ) + self._props["destinations"] = ( + [Ref(client, x) for x in props["destinations"]] + if props["destinations"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventSubscription {} {}>".format(self.id, repr(self._props)) + else: + return "<EventSubscription {}>".format(repr(self._props)) + +
    [docs] def delete( + self, + ): + self._client.event_subscriptions.delete( + id=self.id, + )
    + + @property + def id(self) -> str: + """Unique identifier for this Event Subscription.""" + return self._props["id"] + + @property + def uri(self) -> str: + """URI of the Event Subscription API resource.""" + return self._props["uri"] + + @property + def created_at(self) -> str: + """When the Event Subscription was created (RFC 3339 format).""" + return self._props["created_at"] + + @property + def metadata(self) -> str: + """Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars.""" + return self._props["metadata"] + + @property + def description(self) -> str: + """Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars.""" + return self._props["description"] + + @property + def sources(self) -> Sequence[EventSource]: + """Sources containing the types for which this event subscription will trigger""" + return self._props["sources"] + + @property + def destinations(self) -> Sequence[Ref]: + """Destinations to which these events will be sent""" + return self._props["destinations"]
    + + +
    [docs]class EventSourceReplace(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 "<EventSourceReplace {} {}>".format(self.id, repr(self._props)) + else: + return "<EventSourceReplace {}>".format(repr(self._props)) + + @property + def type(self) -> str: + """Type of event for which an event subscription will trigger""" + return self._props["type"]
    + + +
    [docs]class EventSource(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 "<EventSource {} {}>".format(self.id, repr(self._props)) + else: + return "<EventSource {}>".format(repr(self._props)) + + @property + def type(self) -> str: + """Type of event for which an event subscription will trigger""" + return self._props["type"] + + @property + def uri(self) -> str: + """URI of the Event Source API resource.""" + return self._props["uri"]
    + + +
    [docs]class EventSourceList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["sources"] = ( + [EventSource(client, x) for x in props["sources"]] + if props["sources"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<EventSourceList {} {}>".format(self.id, repr(self._props)) + else: + return "<EventSourceList {}>".format(repr(self._props)) + + @property + def sources(self) -> Sequence[EventSource]: + """The list of all Event Sources for an Event Subscription""" + return self._props["sources"] + + @property + def uri(self) -> str: + """URI of the next page, or null if there is no next page.""" + return self._props["uri"]
    + + +
    [docs]class IPPolicy(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 "<IPPolicy {} {}>".format(self.id, repr(self._props)) + else: + return "<IPPolicy {}>".format(repr(self._props)) + +
    [docs] def delete( + self, + ): + self._client.ip_policies.delete( + id=self.id, + )
    + +
    [docs] def update( + self, + description: str = None, + metadata: str = None, + ): + self._client.ip_policies.update( + id=self.id, + description=description, + metadata=metadata, + )
    + + @property + def id(self) -> str: + """unique identifier for this IP policy""" + return self._props["id"] + + @property + def uri(self) -> str: + """URI of the IP Policy API resource""" + return self._props["uri"] + + @property + def created_at(self) -> str: + """timestamp when the IP policy was created, RFC 3339 format""" + return self._props["created_at"] + + @property + def description(self) -> str: + """human-readable description of the source IPs of this IP policy. optional, max 255 bytes.""" + return self._props["description"] + + @property + def metadata(self) -> str: + """arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.""" + return self._props["metadata"] + + @property + def action(self) -> str: + """the IP policy action. Supported values are ``allow`` or ``deny``""" + return self._props["action"]
    + + +
    [docs]class IPPolicyList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["ip_policies"] = ( + [IPPolicy(client, x) for x in props["ip_policies"]] + if props["ip_policies"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<IPPolicyList {} {}>".format(self.id, repr(self._props)) + else: + return "<IPPolicyList {}>".format(repr(self._props)) + + def __iter__(self): + return PagedIterator(self._client, self, "ip_policies") + + @property + def ip_policies(self) -> Sequence[IPPolicy]: + """the list of all IP policies on this account""" + return self._props["ip_policies"] + + @property + def uri(self) -> str: + """URI of the IP policy 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 IPPolicyRule(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["ip_policy"] = ( + Ref(client, props["ip_policy"]) if props["ip_policy"] is not None else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<IPPolicyRule {} {}>".format(self.id, repr(self._props)) + else: + return "<IPPolicyRule {}>".format(repr(self._props)) + +
    [docs] def delete( + self, + ): + self._client.ip_policy_rules.delete( + id=self.id, + )
    + +
    [docs] def update( + self, + description: str = None, + metadata: str = None, + cidr: str = None, + ): + self._client.ip_policy_rules.update( + id=self.id, + description=description, + metadata=metadata, + cidr=cidr, + )
    + + @property + def id(self) -> str: + """unique identifier for this IP policy rule""" + return self._props["id"] + + @property + def uri(self) -> str: + """URI of the IP policy rule API resource""" + return self._props["uri"] + + @property + def created_at(self) -> str: + """timestamp when the IP policy rule was created, RFC 3339 format""" + return self._props["created_at"] + + @property + def description(self) -> str: + """human-readable description of the source IPs of this IP rule. optional, max 255 bytes.""" + return self._props["description"] + + @property + def metadata(self) -> str: + """arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.""" + return self._props["metadata"] + + @property + def cidr(self) -> str: + """an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.""" + return self._props["cidr"] + + @property + def ip_policy(self) -> Ref: + """object describing the IP policy this IP Policy Rule belongs to""" + return self._props["ip_policy"]
    + + +
    [docs]class IPPolicyRuleList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["ip_policy_rules"] = ( + [IPPolicyRule(client, x) for x in props["ip_policy_rules"]] + if props["ip_policy_rules"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<IPPolicyRuleList {} {}>".format(self.id, repr(self._props)) + else: + return "<IPPolicyRuleList {}>".format(repr(self._props)) + + def __iter__(self): + return PagedIterator(self._client, self, "ip_policy_rules") + + @property + def ip_policy_rules(self) -> Sequence[IPPolicyRule]: + """the list of all IP policy rules on this account""" + return self._props["ip_policy_rules"] + + @property + def uri(self) -> str: + """URI of the IP policy rule 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 IPRestriction(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["ip_policies"] = ( + [Ref(client, x) for x in props["ip_policies"]] + if props["ip_policies"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<IPRestriction {} {}>".format(self.id, repr(self._props)) + else: + return "<IPRestriction {}>".format(repr(self._props)) + +
    [docs] def delete( + self, + ): + self._client.ip_restrictions.delete( + id=self.id, + )
    + + @property + def id(self) -> str: + """unique identifier for this IP restriction""" + return self._props["id"] + + @property + def uri(self) -> str: + """URI of the IP restriction API resource""" + return self._props["uri"] + + @property + def created_at(self) -> str: + """timestamp when the IP restriction was created, RFC 3339 format""" + return self._props["created_at"] + + @property + def description(self) -> str: + """human-readable description of this IP restriction. optional, max 255 bytes.""" + return self._props["description"] + + @property + def metadata(self) -> str: + """arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.""" + return self._props["metadata"] + + @property + def enforced(self) -> bool: + """true if the IP restriction will be enforced. if false, only warnings will be issued""" + return self._props["enforced"] + + @property + def type(self) -> str: + """the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: ``dashboard``, ``api``, ``agent``, and ``endpoints``""" + return self._props["type"] + + @property + def ip_policies(self) -> Sequence[Ref]: + """the set of IP policies that are used to enforce the restriction""" + return self._props["ip_policies"]
    + + +
    [docs]class IPRestrictionList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["ip_restrictions"] = ( + [IPRestriction(client, x) for x in props["ip_restrictions"]] + if props["ip_restrictions"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<IPRestrictionList {} {}>".format(self.id, repr(self._props)) + else: + return "<IPRestrictionList {}>".format(repr(self._props)) + + def __iter__(self): + return PagedIterator(self._client, self, "ip_restrictions") + + @property + def ip_restrictions(self) -> Sequence[IPRestriction]: + """the list of all IP restrictions on this account""" + return self._props["ip_restrictions"] + + @property + def uri(self) -> str: + """URI of the IP resrtrictions 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 IPWhitelistEntry(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 "<IPWhitelistEntry {} {}>".format(self.id, repr(self._props)) + else: + return "<IPWhitelistEntry {}>".format(repr(self._props)) + +
    [docs] def delete( + self, + ): + self._client.ip_whitelist.delete( + id=self.id, + )
    + +
    [docs] def update( + self, + description: str = None, + metadata: str = None, + ): + self._client.ip_whitelist.update( + id=self.id, + description=description, + metadata=metadata, + )
    + + @property + def id(self) -> str: + """unique identifier for this IP whitelist entry""" + return self._props["id"] + + @property + def uri(self) -> str: + """URI of the IP whitelist entry API resource""" + return self._props["uri"] + + @property + def created_at(self) -> str: + """timestamp when the IP whitelist entry was created, RFC 3339 format""" + return self._props["created_at"] + + @property + def description(self) -> str: + """human-readable description of the source IPs for this IP whitelist entry. optional, max 255 bytes.""" + return self._props["description"] + + @property + def metadata(self) -> str: + """arbitrary user-defined machine-readable data of this IP whitelist entry. optional, max 4096 bytes.""" + return self._props["metadata"] + + @property + def ip_net(self) -> str: + """an IP address or IP network range in CIDR notation (e.g. 10.1.1.1 or 10.1.0.0/16) of addresses that will be whitelisted to communicate with your tunnel endpoints""" + return self._props["ip_net"]
    + + +
    [docs]class IPWhitelistEntryList(object): + def __init__(self, client, props): + self._client = client + self._props = props + self._props["whitelist"] = ( + [IPWhitelistEntry(client, x) for x in props["whitelist"]] + if props["whitelist"] is not None + else None + ) + + def __eq__(self, other): + return self._props == other._props + + def __str__(self): + if "id" in self._props: + return "<IPWhitelistEntryList {} {}>".format(self.id, repr(self._props)) + else: + return "<IPWhitelistEntryList {}>".format(repr(self._props)) + + def __iter__(self): + return PagedIterator(self._client, self, "whitelist") + + @property + def whitelist(self) -> Sequence[IPWhitelistEntry]: + """the list of all IP whitelist entries on this account""" + return self._props["whitelist"] + + @property + def uri(self) -> str: + """URI of the IP whitelist 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 ReservedAddr(object): def __init__(self, client, props): self._client = client self._props = props - self._props["endpoint_configuration"] = Ref( - client, props["endpoint_configuration"] + self._props["endpoint_configuration"] = ( + Ref(client, props["endpoint_configuration"]) + if props["endpoint_configuration"] is not None + else None ) def __eq__(self, other): @@ -2482,9 +2798,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["reserved_addrs"] = [ - ReservedAddr(client, x) for x in props["reserved_addrs"] - ] + self._props["reserved_addrs"] = ( + [ReservedAddr(client, x) for x in props["reserved_addrs"]] + if props["reserved_addrs"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -2518,18 +2836,30 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["http_endpoint_configuration"] = Ref( - client, props["http_endpoint_configuration"] + self._props["http_endpoint_configuration"] = ( + Ref(client, props["http_endpoint_configuration"]) + if props["http_endpoint_configuration"] is not None + else None ) - self._props["https_endpoint_configuration"] = Ref( - client, props["https_endpoint_configuration"] + self._props["https_endpoint_configuration"] = ( + Ref(client, props["https_endpoint_configuration"]) + if props["https_endpoint_configuration"] is not None + else None ) - self._props["certificate"] = Ref(client, props["certificate"]) - self._props["certificate_management_policy"] = ReservedDomainCertPolicy( - client, props["certificate_management_policy"] + self._props["certificate"] = ( + Ref(client, props["certificate"]) + if props["certificate"] is not None + else None ) - self._props["certificate_management_status"] = ReservedDomainCertStatus( - client, props["certificate_management_status"] + self._props["certificate_management_policy"] = ( + ReservedDomainCertPolicy(client, props["certificate_management_policy"]) + if props["certificate_management_policy"] is not None + else None + ) + self._props["certificate_management_status"] = ( + ReservedDomainCertStatus(client, props["certificate_management_status"]) + if props["certificate_management_status"] is not None + else None ) def __eq__(self, other): @@ -2618,9 +2948,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["reserved_domains"] = [ - ReservedDomain(client, x) for x in props["reserved_domains"] - ] + self._props["reserved_domains"] = ( + [ReservedDomain(client, x) for x in props["reserved_domains"]] + if props["reserved_domains"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -2679,8 +3011,10 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["provisioning_job"] = ReservedDomainCertJob( - client, props["provisioning_job"] + self._props["provisioning_job"] = ( + ReservedDomainCertJob(client, props["provisioning_job"]) + if props["provisioning_job"] is not None + else None ) def __eq__(self, other): @@ -2734,9 +3068,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["ns_targets"] = [ - ReservedDomainCertNSTarget(client, x) for x in props["ns_targets"] - ] + self._props["ns_targets"] = ( + [ReservedDomainCertNSTarget(client, x) for x in props["ns_targets"]] + if props["ns_targets"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -2845,10 +3181,14 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["ssh_certificate_authorities"] = [ - SSHCertificateAuthority(client, x) - for x in props["ssh_certificate_authorities"] - ] + self._props["ssh_certificate_authorities"] = ( + [ + SSHCertificateAuthority(client, x) + for x in props["ssh_certificate_authorities"] + ] + if props["ssh_certificate_authorities"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -2954,9 +3294,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["ssh_credentials"] = [ - SSHCredential(client, x) for x in props["ssh_credentials"] - ] + self._props["ssh_credentials"] = ( + [SSHCredential(client, x) for x in props["ssh_credentials"]] + if props["ssh_credentials"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -3083,9 +3425,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["ssh_host_certificates"] = [ - SSHHostCertificate(client, x) for x in props["ssh_host_certificates"] - ] + self._props["ssh_host_certificates"] = ( + [SSHHostCertificate(client, x) for x in props["ssh_host_certificates"]] + if props["ssh_host_certificates"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -3222,9 +3566,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["ssh_user_certificates"] = [ - SSHUserCertificate(client, x) for x in props["ssh_user_certificates"] - ] + self._props["ssh_user_certificates"] = ( + [SSHUserCertificate(client, x) for x in props["ssh_user_certificates"]] + if props["ssh_user_certificates"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -3258,8 +3604,10 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["subject_alternative_names"] = TLSCertificateSANs( - client, props["subject_alternative_names"] + self._props["subject_alternative_names"] = ( + TLSCertificateSANs(client, props["subject_alternative_names"]) + if props["subject_alternative_names"] is not None + else None ) def __eq__(self, other): @@ -3399,9 +3747,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["tls_certificates"] = [ - TLSCertificate(client, x) for x in props["tls_certificates"] - ] + self._props["tls_certificates"] = ( + [TLSCertificate(client, x) for x in props["tls_certificates"]] + if props["tls_certificates"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -3460,7 +3810,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["credential"] = Ref(client, props["credential"]) + self._props["credential"] = ( + Ref(client, props["credential"]) + if props["credential"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -3526,9 +3880,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["tunnel_sessions"] = [ - TunnelSession(client, x) for x in props["tunnel_sessions"] - ] + self._props["tunnel_sessions"] = ( + [TunnelSession(client, x) for x in props["tunnel_sessions"]] + if props["tunnel_sessions"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -3562,7 +3918,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["tunnel_session"] = Ref(client, props["tunnel_session"]) + self._props["tunnel_session"] = ( + Ref(client, props["tunnel_session"]) + if props["tunnel_session"] is not None + else None + ) def __eq__(self, other): return self._props == other._props @@ -3613,7 +3973,11 @@ def __init__(self, client, props): self._client = client self._props = props - self._props["tunnels"] = [Tunnel(client, x) for x in props["tunnels"]] + self._props["tunnels"] = ( + [Tunnel(client, x) for x in props["tunnels"]] + if props["tunnels"] is not None + else None + ) def __eq__(self, other): return self._props == other._props diff --git a/docs/_modules/ngrok/error.html b/docs/_modules/ngrok/error.html index 27cd0c0..327397a 100644 --- a/docs/_modules/ngrok/error.html +++ b/docs/_modules/ngrok/error.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • diff --git a/docs/_modules/ngrok/services.html b/docs/_modules/ngrok/services.html index a2763b0..20446c2 100644 --- a/docs/_modules/ngrok/services.html +++ b/docs/_modules/ngrok/services.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -171,6 +173,9 @@
    [docs]class AbuseReportsClient(object): + """Abuse Reports allow you to submit take-down requests for URLs hosted by + ngrok that violate ngrok's terms of service.""" + def __init__(self, client): self._client = client @@ -215,6 +220,12 @@
    [docs]class APIKeysClient(object): + """API Keys are used to authenticate to the `ngrok + API` <https://ngrok.com/docs/api#authentication>`_. You may use the API itself + to provision and manage API Keys but you'll need to provision your first API + key from the `API Keys page` <https://dashboard.ngrok.com/api/keys>`_ on your + ngrok.com dashboard.""" + def __init__(self, client): self._client = client @@ -324,6 +335,12 @@
    [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 + to verify that the TLS certificate presented by a client has been signed by + this CA. Certificate Authorities are used only for mTLS validation only and + thus a private key is not included in the resource.""" + def __init__(self, client): self._client = client @@ -436,6 +453,11 @@
    [docs]class CredentialsClient(object): + """Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok + agent to connect the ngrok service as your account. They are installed with + the ``ngrok authtoken`` command or by specifying it in the ``ngrok.yml`` + configuration file with the ``authtoken`` property.""" + def __init__(self, client): self._client = client @@ -550,6 +572,194 @@ return Credential(self._client, result)
    +
    [docs]class EndpointConfigurationsClient(object): + """Endpoint Configurations are a reusable group of modules that encapsulate how + traffic to a domain or address is handled. Endpoint configurations are only + applied to Domains and TCP Addresses they have been attached to.""" + + def __init__(self, client): + self._client = client + +
    [docs] def create( + self, + type: str = "", + description: str = "", + metadata: str = "", + circuit_breaker: EndpointCircuitBreaker = None, + compression: EndpointCompression = None, + request_headers: EndpointRequestHeaders = None, + response_headers: EndpointResponseHeaders = None, + ip_policy: EndpointIPPolicyMutate = None, + mutual_tls: EndpointMutualTLSMutate = None, + tls_termination: EndpointTLSTermination = None, + webhook_validation: EndpointWebhookValidation = None, + oauth: EndpointOAuth = None, + logging: EndpointLoggingMutate = None, + saml: EndpointSAMLMutate = None, + oidc: EndpointOIDC = None, + ) -> EndpointConfiguration: + """Create a new endpoint configuration + + :param type: they type of traffic this endpoint configuration can be applied to. one of: ``http``, ``https``, ``tcp`` + :param description: human-readable description of what this endpoint configuration will be do when applied or what traffic it will be applied to. Optional, max 255 bytes + :param metadata: arbitrary user-defined machine-readable data of this endpoint configuration. Optional, max 4096 bytes. + :param circuit_breaker: circuit breaker module configuration or ``null`` + :param compression: compression module configuration or ``null`` + :param request_headers: request headers module configuration or ``null`` + :param response_headers: response headers module configuration or ``null`` + :param ip_policy: ip policy module configuration or ``null`` + :param mutual_tls: mutual TLS module configuration or ``null`` + :param tls_termination: TLS termination module configuration or ``null`` + :param webhook_validation: webhook validation module configuration or ``null`` + :param oauth: oauth module configuration or ``null`` + :param logging: logging module configuration or ``null`` + :param saml: saml module configuration or ``null`` + :param oidc: oidc module configuration or ``null`` + + https://ngrok.com/docs/api#api-endpoint-configurations-create + """ + path = "/endpoint_configurations" + result = self._client.http_client.post( + path, + dict( + type=type, + description=description, + metadata=metadata, + circuit_breaker=circuit_breaker, + compression=compression, + request_headers=request_headers, + response_headers=response_headers, + ip_policy=ip_policy, + mutual_tls=mutual_tls, + tls_termination=tls_termination, + webhook_validation=webhook_validation, + oauth=oauth, + logging=logging, + saml=saml, + oidc=oidc, + ), + ) + return EndpointConfiguration(self._client, result)
    + +
    [docs] def delete( + self, + id: str, + ): + """Delete an endpoint configuration. This operation will fail if the endpoint configuration is still referenced by any reserved domain or reserved address. + + :param id: a resource identifier + + https://ngrok.com/docs/api#api-endpoint-configurations-delete + """ + path = "/endpoint_configurations/{id}" + path = path.format( + id=id, + ) + self._client.http_client.delete(path, dict())
    + +
    [docs] def get( + self, + id: str, + ) -> EndpointConfiguration: + """Returns detailed information about an endpoint configuration + + :param id: a resource identifier + + https://ngrok.com/docs/api#api-endpoint-configurations-get + """ + path = "/endpoint_configurations/{id}" + path = path.format( + id=id, + ) + result = self._client.http_client.get(path, dict()) + return EndpointConfiguration(self._client, result)
    + +
    [docs] def list( + self, + before_id: str = None, + limit: str = None, + ) -> EndpointConfigurationList: + """Returns a list of all endpoint configurations on this account + + :param before_id: + :param limit: + + https://ngrok.com/docs/api#api-endpoint-configurations-list + """ + path = "/endpoint_configurations" + result = self._client.http_client.get( + path, + dict( + before_id=before_id, + limit=limit, + ), + ) + return EndpointConfigurationList(self._client, result)
    + +
    [docs] def update( + self, + id: str, + description: str = None, + metadata: str = None, + circuit_breaker: EndpointCircuitBreaker = None, + compression: EndpointCompression = None, + request_headers: EndpointRequestHeaders = None, + response_headers: EndpointResponseHeaders = None, + ip_policy: EndpointIPPolicyMutate = None, + mutual_tls: EndpointMutualTLSMutate = None, + tls_termination: EndpointTLSTermination = None, + webhook_validation: EndpointWebhookValidation = None, + oauth: EndpointOAuth = None, + logging: EndpointLoggingMutate = None, + saml: EndpointSAMLMutate = None, + oidc: EndpointOIDC = None, + ) -> EndpointConfiguration: + """Updates an endpoint configuration. 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. + + :param id: unique identifier of this endpoint configuration + :param description: human-readable description of what this endpoint configuration will be do when applied or what traffic it will be applied to. Optional, max 255 bytes + :param metadata: arbitrary user-defined machine-readable data of this endpoint configuration. Optional, max 4096 bytes. + :param circuit_breaker: circuit breaker module configuration or ``null`` + :param compression: compression module configuration or ``null`` + :param request_headers: request headers module configuration or ``null`` + :param response_headers: response headers module configuration or ``null`` + :param ip_policy: ip policy module configuration or ``null`` + :param mutual_tls: mutual TLS module configuration or ``null`` + :param tls_termination: TLS termination module configuration or ``null`` + :param webhook_validation: webhook validation module configuration or ``null`` + :param oauth: oauth module configuration or ``null`` + :param logging: logging module configuration or ``null`` + :param saml: saml module configuration or ``null`` + :param oidc: oidc module configuration or ``null`` + + https://ngrok.com/docs/api#api-endpoint-configurations-update + """ + path = "/endpoint_configurations/{id}" + path = path.format( + id=id, + ) + result = self._client.http_client.patch( + path, + dict( + description=description, + metadata=metadata, + circuit_breaker=circuit_breaker, + compression=compression, + request_headers=request_headers, + response_headers=response_headers, + ip_policy=ip_policy, + mutual_tls=mutual_tls, + tls_termination=tls_termination, + webhook_validation=webhook_validation, + oauth=oauth, + logging=logging, + saml=saml, + oidc=oidc, + ), + ) + return EndpointConfiguration(self._client, result)
    + +
    [docs]class EventStreamsClient(object): def __init__(self, client): self._client = client @@ -801,7 +1011,238 @@ return EventDestination(self._client, result)
    +
    [docs]class EventSubscriptionsClient(object): + def __init__(self, client): + self._client = client + +
    [docs] def create( + self, + metadata: str = "", + description: str = "", + sources: Sequence[EventSourceReplace] = [], + destination_ids: Sequence[str] = [], + ) -> EventSubscription: + """Create an Event Subscription. + + :param metadata: Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars. + :param description: Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars. + :param sources: Sources containing the types for which this event subscription will trigger + :param destination_ids: A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. + + https://ngrok.com/docs/api#api-event-subscriptions-create + """ + path = "/event_subscriptions" + result = self._client.http_client.post( + path, + dict( + metadata=metadata, + description=description, + sources=sources, + destination_ids=destination_ids, + ), + ) + return EventSubscription(self._client, result)
    + +
    [docs] def delete( + self, + id: str, + ): + """Delete an Event Subscription. + + :param id: a resource identifier + + https://ngrok.com/docs/api#api-event-subscriptions-delete + """ + path = "/event_subscriptions/{id}" + path = path.format( + id=id, + ) + self._client.http_client.delete(path, dict())
    + +
    [docs] def get( + self, + id: str, + ) -> EventSubscription: + """Get an Event Subscription by ID. + + :param id: a resource identifier + + https://ngrok.com/docs/api#api-event-subscriptions-get + """ + path = "/event_subscriptions/{id}" + path = path.format( + id=id, + ) + result = self._client.http_client.get(path, dict()) + return EventSubscription(self._client, result)
    + +
    [docs] def list( + self, + before_id: str = None, + limit: str = None, + ) -> EventSubscriptionList: + """List this Account's Event Subscriptions. + + :param before_id: + :param limit: + + https://ngrok.com/docs/api#api-event-subscriptions-list + """ + path = "/event_subscriptions" + result = self._client.http_client.get( + path, + dict( + before_id=before_id, + limit=limit, + ), + ) + return EventSubscriptionList(self._client, result)
    + +
    [docs] def update( + self, + id: str, + metadata: str = None, + description: str = None, + sources: Sequence[EventSourceReplace] = None, + destination_ids: Sequence[str] = None, + ) -> EventSubscription: + """Update an Event Subscription. + + :param id: Unique identifier for this Event Subscription. + :param metadata: Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars. + :param description: Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars. + :param sources: Sources containing the types for which this event subscription will trigger + :param destination_ids: A list of Event Destination IDs which should be used for this Event Stream. Event Streams are required to have at least one Event Destination. + + https://ngrok.com/docs/api#api-event-subscriptions-update + """ + path = "/event_subscriptions/{id}" + path = path.format( + id=id, + ) + result = self._client.http_client.patch( + path, + dict( + metadata=metadata, + description=description, + sources=sources, + destination_ids=destination_ids, + ), + ) + return EventSubscription(self._client, result)
    + + +
    [docs]class EventSourcesClient(object): + def __init__(self, client): + self._client = client + +
    [docs] def create( + self, + subscription_id: str, + type: str = "", + ) -> EventSource: + """Add an additional type for which this event subscription will trigger + + :param subscription_id: The unique identifier for the Event Subscription that this Event Source is attached to. + :param type: Type of event for which an event subscription will trigger + + https://ngrok.com/docs/api#api-event-sources-create + """ + path = "/event_subscriptions/{subscription_id}/sources" + path = path.format( + subscription_id=subscription_id, + ) + result = self._client.http_client.post( + path, + dict( + type=type, + ), + ) + return EventSource(self._client, result)
    + +
    [docs] def delete( + self, + subscription_id: str, + type: str, + ): + """Remove a type for which this event subscription will trigger + + :param subscription_id: The unique identifier for the Event Subscription that this Event Source is attached to. + :param type: Type of event for which an event subscription will trigger + + https://ngrok.com/docs/api#api-event-sources-delete + """ + path = "/event_subscriptions/{subscription_id}/sources/{type}" + path = path.format( + subscription_id=subscription_id, + type=type, + ) + self._client.http_client.delete(path, dict())
    + +
    [docs] def get( + self, + subscription_id: str, + type: str, + ) -> EventSource: + """Get the details for a given type that triggers for the given event subscription + + :param subscription_id: The unique identifier for the Event Subscription that this Event Source is attached to. + :param type: Type of event for which an event subscription will trigger + + https://ngrok.com/docs/api#api-event-sources-get + """ + path = "/event_subscriptions/{subscription_id}/sources/{type}" + path = path.format( + subscription_id=subscription_id, + type=type, + ) + result = self._client.http_client.get(path, dict()) + return EventSource(self._client, result)
    + +
    [docs] def list( + self, + subscription_id: str, + ) -> EventSourceList: + """List the types for which this event subscription will trigger + + :param subscription_id: The unique identifier for the Event Subscription that this Event Source is attached to. + + https://ngrok.com/docs/api#api-event-sources-list + """ + path = "/event_subscriptions/{subscription_id}/sources" + path = path.format( + subscription_id=subscription_id, + ) + result = self._client.http_client.get(path, dict()) + return EventSourceList(self._client, result)
    + +
    [docs] def update( + self, + subscription_id: str, + type: str, + ) -> EventSource: + """Update the type for which this event subscription will trigger + + :param subscription_id: The unique identifier for the Event Subscription that this Event Source is attached to. + :param type: Type of event for which an event subscription will trigger + + https://ngrok.com/docs/api#api-event-sources-update + """ + path = "/event_subscriptions/{subscription_id}/sources/{type}" + path = path.format( + subscription_id=subscription_id, + type=type, + ) + result = self._client.http_client.patch(path, dict()) + return EventSource(self._client, result)
    + +
    [docs]class IPPoliciesClient(object): + """IP Policies are reusable groups of CIDR ranges with an ``allow`` or ``deny`` + action. They can be attached to endpoints via the Endpoint Configuration IP + Policy module. They can also be used with IP Restrictions to control source + IP ranges that can start tunnel sessions and connect to the API and dashboard.""" + def __init__(self, client): self._client = client @@ -914,6 +1355,9 @@
    [docs]class IPPolicyRulesClient(object): + """IP Policy Rules are the IPv4 or IPv6 CIDRs entries that + make up an IP Policy.""" + def __init__(self, client): self._client = client @@ -1032,6 +1476,13 @@
    [docs]class IPRestrictionsClient(object): + """An IP restriction is a restriction placed on the CIDRs that are allowed to + initate traffic to a specific aspect of your ngrok account. An IP + restriction has a type which defines the ingress it applies to. IP + restrictions can be used to enforce the source IPs that can make API + requests, log in to the dashboard, start ngrok agents, and connect to your + public-facing endpoints.""" + def __init__(self, client): self._client = client @@ -1047,7 +1498,7 @@ :param description: human-readable description of this IP restriction. optional, max 255 bytes. :param metadata: arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes. - :param enforced: true if the IP restriction will be enforce. if false, only warnings will be issued + :param enforced: true if the IP restriction will be enforced. if false, only warnings will be issued :param type: the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: ``dashboard``, ``api``, ``agent``, and ``endpoints`` :param ip_policy_ids: the set of IP policy identifiers that are used to enforce the restriction @@ -1134,7 +1585,7 @@ :param id: :param description: human-readable description of this IP restriction. optional, max 255 bytes. :param metadata: arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes. - :param enforced: true if the IP restriction will be enforce. if false, only warnings will be issued + :param enforced: true if the IP restriction will be enforced. if false, only warnings will be issued :param ip_policy_ids: the set of IP policy identifiers that are used to enforce the restriction https://ngrok.com/docs/api#api-ip-restrictions-update @@ -1156,6 +1607,9 @@
    [docs]class IPWhitelistClient(object): + """The IP Whitelist is deprecated and will be removed. Use an IP Restriction + with an ``endpoints`` type instead.""" + def __init__(self, client): self._client = client @@ -1267,193 +1721,6 @@ return IPWhitelistEntry(self._client, result)
    -
    [docs]class EndpointConfigurationsClient(object): - """Endpoint Configuration managementAn `Endpoint Configuration` <https://ngrok.com/docs/ngrok-link#api-endpoint-configurations>`_ describes - a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!*""" - - def __init__(self, client): - self._client = client - -
    [docs] def create( - self, - type: str = "", - description: str = "", - metadata: str = "", - circuit_breaker: EndpointCircuitBreaker = None, - compression: EndpointCompression = None, - request_headers: EndpointRequestHeaders = None, - response_headers: EndpointResponseHeaders = None, - ip_policy: EndpointIPPolicyMutate = None, - mutual_tls: EndpointMutualTLSMutate = None, - tls_termination: EndpointTLSTermination = None, - webhook_validation: EndpointWebhookValidation = None, - oauth: EndpointOAuth = None, - logging: EndpointLoggingMutate = None, - saml: EndpointSAMLMutate = None, - oidc: EndpointOIDC = None, - ) -> EndpointConfiguration: - """Create a new endpoint configuration - - :param type: they type of traffic this endpoint configuration can be applied to. one of: ``http``, ``https``, ``tcp`` - :param description: human-readable description of what this endpoint configuration will be do when applied or what traffic it will be applied to. Optional, max 255 bytes - :param metadata: arbitrary user-defined machine-readable data of this endpoint configuration. Optional, max 4096 bytes. - :param circuit_breaker: circuit breaker module configuration or ``null`` - :param compression: compression module configuration or ``null`` - :param request_headers: request headers module configuration or ``null`` - :param response_headers: response headers module configuration or ``null`` - :param ip_policy: ip policy module configuration or ``null`` - :param mutual_tls: mutual TLS module configuration or ``null`` - :param tls_termination: TLS termination module configuration or ``null`` - :param webhook_validation: webhook validation module configuration or ``null`` - :param oauth: oauth module configuration or ``null`` - :param logging: logging module configuration or ``null`` - :param saml: saml module configuration or ``null`` - :param oidc: oidc module configuration or ``null`` - - https://ngrok.com/docs/api#api-endpoint-configurations-create - """ - path = "/endpoint_configurations" - result = self._client.http_client.post( - path, - dict( - type=type, - description=description, - metadata=metadata, - circuit_breaker=circuit_breaker, - compression=compression, - request_headers=request_headers, - response_headers=response_headers, - ip_policy=ip_policy, - mutual_tls=mutual_tls, - tls_termination=tls_termination, - webhook_validation=webhook_validation, - oauth=oauth, - logging=logging, - saml=saml, - oidc=oidc, - ), - ) - return EndpointConfiguration(self._client, result)
    - -
    [docs] def delete( - self, - id: str, - ): - """Delete an endpoint configuration. This operation will fail if the endpoint configuration is still referenced by any reserved domain or reserved address. - - :param id: a resource identifier - - https://ngrok.com/docs/api#api-endpoint-configurations-delete - """ - path = "/endpoint_configurations/{id}" - path = path.format( - id=id, - ) - self._client.http_client.delete(path, dict())
    - -
    [docs] def get( - self, - id: str, - ) -> EndpointConfiguration: - """Returns detailed information about an endpoint configuration - - :param id: a resource identifier - - https://ngrok.com/docs/api#api-endpoint-configurations-get - """ - path = "/endpoint_configurations/{id}" - path = path.format( - id=id, - ) - result = self._client.http_client.get(path, dict()) - return EndpointConfiguration(self._client, result)
    - -
    [docs] def list( - self, - before_id: str = None, - limit: str = None, - ) -> EndpointConfigurationList: - """Returns a list of all endpoint configurations on this account - - :param before_id: - :param limit: - - https://ngrok.com/docs/api#api-endpoint-configurations-list - """ - path = "/endpoint_configurations" - result = self._client.http_client.get( - path, - dict( - before_id=before_id, - limit=limit, - ), - ) - return EndpointConfigurationList(self._client, result)
    - -
    [docs] def update( - self, - id: str, - description: str = None, - metadata: str = None, - circuit_breaker: EndpointCircuitBreaker = None, - compression: EndpointCompression = None, - request_headers: EndpointRequestHeaders = None, - response_headers: EndpointResponseHeaders = None, - ip_policy: EndpointIPPolicyMutate = None, - mutual_tls: EndpointMutualTLSMutate = None, - tls_termination: EndpointTLSTermination = None, - webhook_validation: EndpointWebhookValidation = None, - oauth: EndpointOAuth = None, - logging: EndpointLoggingMutate = None, - saml: EndpointSAMLMutate = None, - oidc: EndpointOIDC = None, - ) -> EndpointConfiguration: - """Updates an endpoint configuration. 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. - - :param id: unique identifier of this endpoint configuration - :param description: human-readable description of what this endpoint configuration will be do when applied or what traffic it will be applied to. Optional, max 255 bytes - :param metadata: arbitrary user-defined machine-readable data of this endpoint configuration. Optional, max 4096 bytes. - :param circuit_breaker: circuit breaker module configuration or ``null`` - :param compression: compression module configuration or ``null`` - :param request_headers: request headers module configuration or ``null`` - :param response_headers: response headers module configuration or ``null`` - :param ip_policy: ip policy module configuration or ``null`` - :param mutual_tls: mutual TLS module configuration or ``null`` - :param tls_termination: TLS termination module configuration or ``null`` - :param webhook_validation: webhook validation module configuration or ``null`` - :param oauth: oauth module configuration or ``null`` - :param logging: logging module configuration or ``null`` - :param saml: saml module configuration or ``null`` - :param oidc: oidc module configuration or ``null`` - - https://ngrok.com/docs/api#api-endpoint-configurations-update - """ - path = "/endpoint_configurations/{id}" - path = path.format( - id=id, - ) - result = self._client.http_client.patch( - path, - dict( - description=description, - metadata=metadata, - circuit_breaker=circuit_breaker, - compression=compression, - request_headers=request_headers, - response_headers=response_headers, - ip_policy=ip_policy, - mutual_tls=mutual_tls, - tls_termination=tls_termination, - webhook_validation=webhook_validation, - oauth=oauth, - logging=logging, - saml=saml, - oidc=oidc, - ), - ) - return EndpointConfiguration(self._client, result)
    - -
    [docs]class EndpointLoggingModuleClient(object): def __init__(self, client): self._client = client @@ -2199,6 +2466,10 @@
    [docs]class ReservedAddrsClient(object): + """Reserved Addresses are TCP addresses that can be used to listen for traffic. + TCP address hostnames and ports are assigned by ngrok, they cannot be + chosen.""" + def __init__(self, client): self._client = client @@ -2333,6 +2604,11 @@
    [docs]class ReservedDomainsClient(object): + """Reserved Domains are hostnames that you can listen for traffic on. Domains + can be used to listen for http, https or tls traffic. You may use a domain + that you own by creating a CNAME record specified in the returned resource. + This CNAME record points traffic for that domain to ngrok's edge servers.""" + def __init__(self, client): self._client = client @@ -2342,8 +2618,8 @@ region: str = "", description: str = "", metadata: str = "", - http_endpoint_configuration_id: str = "", - https_endpoint_configuration_id: str = "", + http_endpoint_configuration_id: str = None, + https_endpoint_configuration_id: str = None, certificate_id: str = None, certificate_management_policy: ReservedDomainCertPolicy = None, ) -> ReservedDomain: @@ -2536,6 +2812,9 @@
    [docs]class SSHCertificateAuthoritiesClient(object): + """An SSH Certificate Authority is a pair of an SSH Certificate and its private + key that can be used to sign other SSH host and user certificates.""" + def __init__(self, client): self._client = client @@ -2654,6 +2933,9 @@
    [docs]class SSHCredentialsClient(object): + """SSH Credentials are SSH public keys that can be used to start SSH tunnels + via the ngrok SSH tunnel gateway.""" + def __init__(self, client): self._client = client @@ -2772,6 +3054,10 @@
    [docs]class SSHHostCertificatesClient(object): + """SSH Host Certificates along with the corresponding private key allows an SSH + server to assert its authenticity to connecting SSH clients who trust the + SSH Certificate Authority that was used to sign the certificate.""" + def __init__(self, client): self._client = client @@ -2896,6 +3182,10 @@
    [docs]class SSHUserCertificatesClient(object): + """SSH User Certificates are presented by SSH clients when connecting to an SSH + server to authenticate their connection. The SSH server must trust the SSH + Certificate Authority used to sign the certificate.""" + def __init__(self, client): self._client = client @@ -3026,6 +3316,12 @@
    [docs]class TLSCertificatesClient(object): + """TLS Certificates are pairs of x509 certificates and their matching private + key that can be used to terminate TLS traffic. TLS certificates are unused + until they are attached to a Domain. TLS Certificates may also be + provisioned by ngrok automatically for domains on which you have enabled + automated certificate provisioning.""" + def __init__(self, client): self._client = client @@ -3141,6 +3437,10 @@
    [docs]class TunnelSessionsClient(object): + """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.""" + def __init__(self, client): self._client = client @@ -3233,6 +3533,9 @@
    [docs]class TunnelsClient(object): + """Tunnels provide endpoints to access services exposed by a running ngrok + agent tunnel session or an SSH reverse tunnel session.""" + def __init__(self, client): self._client = client diff --git a/docs/_sources/event_sources.rst.txt b/docs/_sources/event_sources.rst.txt new file mode 100644 index 0000000..f096cc0 --- /dev/null +++ b/docs/_sources/event_sources.rst.txt @@ -0,0 +1,9 @@ +Event Sources +===================================== + +Do not construct this object directly, instead access the +:attr:`~ngrok.Client.event_sources` property of an :class:`ngrok.Client` object. + +.. automodule:: ngrok.services + :members: EventSourcesClient + :undoc-members: EventSourcesClient diff --git a/docs/_sources/event_subscriptions.rst.txt b/docs/_sources/event_subscriptions.rst.txt new file mode 100644 index 0000000..89bc463 --- /dev/null +++ b/docs/_sources/event_subscriptions.rst.txt @@ -0,0 +1,9 @@ +Event Subscriptions +===================================== + +Do not construct this object directly, instead access the +:attr:`~ngrok.Client.event_subscriptions` property of an :class:`ngrok.Client` object. + +.. automodule:: ngrok.services + :members: EventSubscriptionsClient + :undoc-members: EventSubscriptionsClient diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt index be95012..c5f3a85 100644 --- a/docs/_sources/index.rst.txt +++ b/docs/_sources/index.rst.txt @@ -41,10 +41,10 @@ object. That's it! policy = ng.ip_policies.create(action="allow") for cidr in ["24.0.0.0/8", "12.0.0.0/8"]: ng.ip_policy_rules.create(cidr=cidr, ip_policy_id=policy.id) - -Transparent Paging ------------------- + +Automatic Paging +---------------- The ngrok API pages all list resources but this library abstracts that away from you. All response objects from any ``list()`` methods return an object that @@ -120,13 +120,15 @@ API Reference api_keys certificate_authorities credentials + endpoint_configurations event_streams event_destinations + event_subscriptions + event_sources ip_policies ip_policy_rules ip_restrictions ip_whitelist - endpoint_configurations endpoint_logging_module endpoint_circuit_breaker_module endpoint_compression_module diff --git a/docs/abuse_reports.html b/docs/abuse_reports.html index 27944eb..ce93908 100644 --- a/docs/abuse_reports.html +++ b/docs/abuse_reports.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -168,7 +170,9 @@
    class ngrok.services.AbuseReportsClient(client)[source]¶
    -
    +

    Abuse Reports allow you to submit take-down requests for URLs hosted by +ngrok that violate ngrok’s terms of service.

    +
    create(urls, metadata='')[source]¶

    Creates a new abuse report which will be reviewed by our system and abuse response team. This API is only available to authorized accounts. Contact abuse@ngrok.com to request access

    diff --git a/docs/api_keys.html b/docs/api_keys.html index 62a36db..321df58 100644 --- a/docs/api_keys.html +++ b/docs/api_keys.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -168,7 +170,12 @@
    class ngrok.services.APIKeysClient(client)[source]¶
    -
    +

    API Keys are used to authenticate to the ngrok +API <https://ngrok.com/docs/api#authentication>`_. You may use the API itself +to provision and manage API Keys but you’ll need to provision your first API +key from the API Keys page <https://dashboard.ngrok.com/api/keys>`_ on your +ngrok.com dashboard.

    +
    create(description='', metadata='')[source]¶

    Create a new API key. The generated API key can be used to authenticate to the ngrok API.

    diff --git a/docs/certificate_authorities.html b/docs/certificate_authorities.html index 171fa80..4dfd0cd 100644 --- a/docs/certificate_authorities.html +++ b/docs/certificate_authorities.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -168,7 +170,12 @@
    class ngrok.services.CertificateAuthoritiesClient(client)[source]¶
    -
    +

    Certificate Authorities are x509 certificates that are used to sign other +x509 certificates. Attach a Certificate Authority to the Mutual TLS module +to verify that the TLS certificate presented by a client has been signed by +this CA. Certificate Authorities are used only for mTLS validation only and +thus a private key is not included in the resource.

    +
    create(ca_pem, description='', metadata='')[source]¶

    Upload a new Certificate Authority

    diff --git a/docs/client.html b/docs/client.html index 9d6e7b9..6b1607d 100644 --- a/docs/client.html +++ b/docs/client.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -186,7 +188,9 @@ Client object:

    property abuse_reports¶
    -
    +

    Abuse Reports allow you to submit take-down requests for URLs hosted by +ngrok that violate ngrok’s terms of service.

    +
    Return type

    AbuseReportsClient

    @@ -195,7 +199,12 @@ Client object:

    property api_keys¶
    -
    +

    API Keys are used to authenticate to the ngrok +API <https://ngrok.com/docs/api#authentication>`_. You may use the API itself +to provision and manage API Keys but you’ll need to provision your first API +key from the API Keys page <https://dashboard.ngrok.com/api/keys>`_ on your +ngrok.com dashboard.

    +
    Return type

    APIKeysClient

    @@ -204,7 +213,12 @@ Client object:

    property certificate_authorities¶
    -
    +

    Certificate Authorities are x509 certificates that are used to sign other +x509 certificates. Attach a Certificate Authority to the Mutual TLS module +to verify that the TLS certificate presented by a client has been signed by +this CA. Certificate Authorities are used only for mTLS validation only and +thus a private key is not included in the resource.

    +
    Return type

    CertificateAuthoritiesClient

    @@ -213,7 +227,11 @@ Client object:

    property credentials¶
    -
    +

    Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok +agent to connect the ngrok service as your account. They are installed with +the ngrok authtoken command or by specifying it in the ngrok.yml +configuration file with the authtoken property.

    +
    Return type

    CredentialsClient

    @@ -222,8 +240,9 @@ Client object:

    property endpoint_configurations¶
    -

    Endpoint Configuration managementAn Endpoint Configuration <https://ngrok.com/docs/ngrok-link#api-endpoint-configurations>`_ describes -a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!*

    +

    Endpoint Configurations are a reusable group of modules that encapsulate how +traffic to a domain or address is handled. Endpoint configurations are only +applied to Domains and TCP Addresses they have been attached to.

    Return type

    EndpointConfigurationsClient

    @@ -240,6 +259,15 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    +
    +property event_sources¶
    +
    +
    Return type
    +

    EventSourcesClient

    +
    +
    +
    +
    property event_streams¶
    @@ -249,9 +277,22 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    +
    +property event_subscriptions¶
    +
    +
    Return type
    +

    EventSubscriptionsClient

    +
    +
    +
    +
    property ip_policies¶
    -
    +

    IP Policies are reusable groups of CIDR ranges with an allow or deny +action. They can be attached to endpoints via the Endpoint Configuration IP +Policy module. They can also be used with IP Restrictions to control source +IP ranges that can start tunnel sessions and connect to the API and dashboard.

    +
    Return type

    IPPoliciesClient

    @@ -260,7 +301,9 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property ip_policy_rules¶
    -
    +

    IP Policy Rules are the IPv4 or IPv6 CIDRs entries that +make up an IP Policy.

    +
    Return type

    IPPolicyRulesClient

    @@ -269,7 +312,13 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property ip_restrictions¶
    -
    +

    An IP restriction is a restriction placed on the CIDRs that are allowed to +initate traffic to a specific aspect of your ngrok account. An IP +restriction has a type which defines the ingress it applies to. IP +restrictions can be used to enforce the source IPs that can make API +requests, log in to the dashboard, start ngrok agents, and connect to your +public-facing endpoints.

    +
    Return type

    IPRestrictionsClient

    @@ -278,7 +327,9 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property ip_whitelist¶
    -
    +

    The IP Whitelist is deprecated and will be removed. Use an IP Restriction +with an endpoints type instead.

    +
    Return type

    IPWhitelistClient

    @@ -291,7 +342,10 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property reserved_addrs¶
    -
    +

    Reserved Addresses are TCP addresses that can be used to listen for traffic. +TCP address hostnames and ports are assigned by ngrok, they cannot be +chosen.

    +
    Return type

    ReservedAddrsClient

    @@ -300,7 +354,11 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property reserved_domains¶
    -
    +

    Reserved Domains are hostnames that you can listen for traffic on. Domains +can be used to listen for http, https or tls traffic. You may use a domain +that you own by creating a CNAME record specified in the returned resource. +This CNAME record points traffic for that domain to ngrok’s edge servers.

    +
    Return type

    ReservedDomainsClient

    @@ -309,7 +367,9 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property ssh_certificate_authorities¶
    -
    +

    An SSH Certificate Authority is a pair of an SSH Certificate and its private +key that can be used to sign other SSH host and user certificates.

    +
    Return type

    SSHCertificateAuthoritiesClient

    @@ -318,7 +378,9 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property ssh_credentials¶
    -
    +

    SSH Credentials are SSH public keys that can be used to start SSH tunnels +via the ngrok SSH tunnel gateway.

    +
    Return type

    SSHCredentialsClient

    @@ -327,7 +389,10 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property ssh_host_certificates¶
    -
    +

    SSH Host Certificates along with the corresponding private key allows an SSH +server to assert its authenticity to connecting SSH clients who trust the +SSH Certificate Authority that was used to sign the certificate.

    +
    Return type

    SSHHostCertificatesClient

    @@ -336,7 +401,10 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property ssh_user_certificates¶
    -
    +

    SSH User Certificates are presented by SSH clients when connecting to an SSH +server to authenticate their connection. The SSH server must trust the SSH +Certificate Authority used to sign the certificate.

    +
    Return type

    SSHUserCertificatesClient

    @@ -345,7 +413,12 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property tls_certificates¶
    -
    +

    TLS Certificates are pairs of x509 certificates and their matching private +key that can be used to terminate TLS traffic. TLS certificates are unused +until they are attached to a Domain. TLS Certificates may also be +provisioned by ngrok automatically for domains on which you have enabled +automated certificate provisioning.

    +
    Return type

    TLSCertificatesClient

    @@ -354,7 +427,10 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property tunnel_sessions¶
    -
    +

    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 type

    TunnelSessionsClient

    @@ -363,7 +439,9 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!
    property tunnels¶
    -
    +

    Tunnels provide endpoints to access services exposed by a running ngrok +agent tunnel session or an SSH reverse tunnel session.

    +
    Return type

    TunnelsClient

    diff --git a/docs/credentials.html b/docs/credentials.html index 96b8def..3c358f6 100644 --- a/docs/credentials.html +++ b/docs/credentials.html @@ -2,7 +2,7 @@ - + Tunnel Credentials - ngrok-api documentation @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -168,7 +170,11 @@
    class ngrok.services.CredentialsClient(client)[source]¶
    -
    +

    Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok +agent to connect the ngrok service as your account. They are installed with +the ngrok authtoken command or by specifying it in the ngrok.yml +configuration file with the authtoken property.

    +
    create(description='', metadata='', acl=[])[source]¶

    Create a new tunnel authtoken credential. This authtoken credential can be used to start a new tunnel session. The response to this API call is the only time the generated token is available. If you need it for future use, you must save it securely yourself.

    @@ -262,12 +268,12 @@
    +
    +property nameid_format¶
    +

    Defines the name identifier format the SP expects the IdP to use in its assertions to identify subjects. If unspecified, a default value of urn:oasis:names:tc:SAML:2.0:nameid-format:persistent will be used. A subset of the allowed values enumerated by the SAML specification are supported.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    property options_passthrough¶

    Do not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.

    @@ -1893,6 +1905,16 @@
    +
    +property nameid_format¶
    +

    Defines the name identifier format the SP expects the IdP to use in its assertions to identify subjects. If unspecified, a default value of urn:oasis:names:tc:SAML:2.0:nameid-format:persistent will be used. A subset of the allowed values enumerated by the SAML specification are supported.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    property options_passthrough¶

    Do not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.

    @@ -1953,7 +1975,7 @@
    property provider¶
    -

    a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers: SLACK, SNS, STRIPE, GITHUB, TWILIO, SHOPIFY, GITLAB, INTERCOM.

    +

    a string indicating which webhook provider will be sending webhooks to this endpoint. Value must be one of the supported providers: SLACK, SNS, STRIPE, GITHUB, TWILIO, SHOPIFY, GITLAB, INTERCOM, SENDGRID.

    Return type

    str

    @@ -2084,6 +2106,68 @@
    +
    +class ngrok.datatypes.EventSource(client, props)[source]¶
    +
    +
    +property type¶
    +

    Type of event for which an event subscription will trigger

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +property uri¶
    +

    URI of the Event Source API resource.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +
    +class ngrok.datatypes.EventSourceList(client, props)[source]¶
    +
    +
    +property sources¶
    +

    The list of all Event Sources for an Event Subscription

    +
    +
    Return type
    +

    Sequence[EventSource]

    +
    +
    +
    +
    +
    +property uri¶
    +

    URI of the next page, or null if there is no next page.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +
    +class ngrok.datatypes.EventSourceReplace(client, props)[source]¶
    +
    +
    +property type¶
    +

    Type of event for which an event subscription will trigger

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    class ngrok.datatypes.EventStream(client, props)[source]¶
    @@ -2220,6 +2304,118 @@
    +
    +class ngrok.datatypes.EventSubscription(client, props)[source]¶
    +
    +
    +property created_at¶
    +

    When the Event Subscription was created (RFC 3339 format).

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +delete()[source]¶
    +
    +
    +
    +property description¶
    +

    Arbitrary customer supplied information intended to be human readable. Optional, max 255 chars.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +property destinations¶
    +

    Destinations to which these events will be sent

    +
    +
    Return type
    +

    Sequence[Ref]

    +
    +
    +
    +
    +
    +property id¶
    +

    Unique identifier for this Event Subscription.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +property metadata¶
    +

    Arbitrary customer supplied information intended to be machine readable. Optional, max 4096 chars.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +property sources¶
    +

    Sources containing the types for which this event subscription will trigger

    +
    +
    Return type
    +

    Sequence[EventSource]

    +
    +
    +
    +
    +
    +property uri¶
    +

    URI of the Event Subscription API resource.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +
    +class ngrok.datatypes.EventSubscriptionList(client, props)[source]¶
    +
    +
    +property event_subscriptions¶
    +

    The list of all Event Subscriptions on this account.

    +
    +
    Return type
    +

    Sequence[EventSubscription]

    +
    +
    +
    +
    +
    +property next_page_uri¶
    +

    URI of next page, or null if there is no next page.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    +property uri¶
    +

    URI of the Event Subscriptions list API resource.

    +
    +
    Return type
    +

    str

    +
    +
    +
    +
    +
    class ngrok.datatypes.EventTarget(client, props)[source]¶
    @@ -2577,7 +2773,7 @@
    property enforced¶
    -

    true if the IP restriction will be enforce. if false, only warnings will be issued

    +

    true if the IP restriction will be enforced. if false, only warnings will be issued

    Return type

    bool

    diff --git a/docs/endpoint_circuit_breaker_module.html b/docs/endpoint_circuit_breaker_module.html index 3164f32..1251887 100644 --- a/docs/endpoint_circuit_breaker_module.html +++ b/docs/endpoint_circuit_breaker_module.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • diff --git a/docs/endpoint_compression_module.html b/docs/endpoint_compression_module.html index 232b44a..ebb768f 100644 --- a/docs/endpoint_compression_module.html +++ b/docs/endpoint_compression_module.html @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • diff --git a/docs/endpoint_configurations.html b/docs/endpoint_configurations.html index e42cef5..1cf95a9 100644 --- a/docs/endpoint_configurations.html +++ b/docs/endpoint_configurations.html @@ -2,7 +2,7 @@ - + Endpoint Configurations - ngrok-api documentation @@ -119,13 +119,15 @@
  • API Keys
  • Certificate Authorities
  • Tunnel Credentials
  • +
  • Endpoint Configurations
  • Event Streams
  • Event Destinations
  • +
  • Event Subscriptions
  • +
  • Event Sources
  • IP Policies
  • IP Policy Rules
  • IP Restrictions
  • IP Whitelist
  • -
  • Endpoint Configurations
  • Logging Module
  • Circuit Breaker Module
  • Compression Module
  • @@ -168,8 +170,9 @@
    class ngrok.services.EndpointConfigurationsClient(client)[source]¶
    -

    Endpoint Configuration managementAn Endpoint Configuration <https://ngrok.com/docs/ngrok-link#api-endpoint-configurations>`_ describes -a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!*

    +

    Endpoint Configurations are a reusable group of modules that encapsulate how +traffic to a domain or address is handled. Endpoint configurations are only +applied to Domains and TCP Addresses they have been attached to.

    create(type='', description='', metadata='', circuit_breaker=None, compression=None, request_headers=None, response_headers=None, ip_policy=None, mutual_tls=None, tls_termination=None, webhook_validation=None, oauth=None, logging=None, saml=None, oidc=None)[source]¶
    @@ -287,23 +290,23 @@ a ngrok network endpoint instance.*Endpoints are your gateway to ngrok features!