Package com.ngrok
Class Ngrok
java.lang.Object
com.ngrok.Ngrok
Main entry point for the ngrok API.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
A namespace object for Backends.class
A namespace object for EdgeModules.class
A namespace object for Edges. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAbuse Reports allow you to submit take-down requests for URLs hosted by ngrok that violate ngrok's terms of service.Creates a service client for AgentIngresses.apiKeys()
API Keys are used to authenticate to the ngrok API.backends()
Creates a namespace object for Backends.Certificate Authorities are x509 certificates that are used to sign other x509 certificates.static Ngrok
Creates a new ngrok API instance using the default API client.static Ngrok
createDefault
(String apiKey) Creates a new ngrok API instance using the default API client.Tunnel Credentials are ngrok agent authtokens.Creates a namespace object for EdgeModules.edges()
Creates a namespace object for Edges.Endpoints provides an API for querying the endpoint objects which define what tunnel or edge is used to serve a hostport.Creates a service client for EventDestinations.Creates a service client for EventSources.Creates a service client for EventSubscriptions.IP Policies are reusable groups of CIDR ranges with anallow
ordeny
action.IP Policy Rules are the IPv4 or IPv6 CIDRs entries that make up an IP Policy.An IP restriction is a restriction placed on the CIDRs that are allowed to initiate traffic to a specific aspect of your ngrok account.Reserved Addresses are TCP addresses that can be used to listen for traffic.Reserved Domains are hostnames that you can listen for traffic on.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.SSH Credentials are SSH public keys that can be used to start SSH tunnels via the ngrok SSH tunnel gateway.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.SSH User Certificates are presented by SSH clients when connecting to an SSH server to authenticate their connection.TLS Certificates are pairs of x509 certificates and their matching private key that can be used to terminate TLS traffic.tunnels()
Tunnels provide endpoints to access services exposed by a running ngrok agent tunnel session or an SSH reverse tunnel session.Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel sessions that are running and connected to the ngrok service.
-
Constructor Details
-
Ngrok
Create a new ngrok API instance.- Parameters:
apiClient
- an instance ofNgrokApiClient
- See Also:
-
-
Method Details
-
createDefault
Creates a new ngrok API instance using the default API client.- Parameters:
apiKey
- API key used to access the ngrok API- Returns:
- an ngrok API instance
-
createDefault
Creates a new ngrok API instance using the default API client. The API key is pulled from the environment variableNGROK_API_KEY
.- Returns:
- an ngrok API instance
-
abuseReports
Abuse Reports allow you to submit take-down requests for URLs hosted by ngrok that violate ngrok's terms of service. See also https://ngrok.com/docs/api#api-abuse-reports.- Returns:
- a service client
-
agentIngresses
Creates a service client for AgentIngresses. See also https://ngrok.com/docs/api#api-agent-ingresses.- Returns:
- a service client
-
apiKeys
API Keys are used to authenticate to the ngrok API. 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 on your ngrok.com dashboard. See also https://ngrok.com/docs/api#api-api-keys.- Returns:
- a service client
-
certificateAuthorities
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. See also https://ngrok.com/docs/api#api-certificate-authorities.- Returns:
- a service client
-
credentials
Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok agent to connect the ngrok service as your account. They are installed with thengrok config add-authtoken
command or by specifying it in thengrok.yml
configuration file with theauthtoken
property. See also https://ngrok.com/docs/api#api-credentials.- Returns:
- a service client
-
endpoints
Endpoints provides an API for querying the endpoint objects which define what tunnel or edge is used to serve a hostport. Only active endpoints associated with a tunnel or backend are returned. See also https://ngrok.com/docs/api#api-endpoints.- Returns:
- a service client
-
eventDestinations
Creates a service client for EventDestinations. See also https://ngrok.com/docs/api#api-event-destinations.- Returns:
- a service client
-
eventSubscriptions
Creates a service client for EventSubscriptions. See also https://ngrok.com/docs/api#api-event-subscriptions.- Returns:
- a service client
-
eventSources
Creates a service client for EventSources. See also https://ngrok.com/docs/api#api-event-sources.- Returns:
- a service client
-
ipPolicies
IP Policies are reusable groups of CIDR ranges with anallow
ordeny
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. See also https://ngrok.com/docs/api#api-ip-policies.- Returns:
- a service client
-
ipPolicyRules
IP Policy Rules are the IPv4 or IPv6 CIDRs entries that make up an IP Policy. See also https://ngrok.com/docs/api#api-ip-policy-rules.- Returns:
- a service client
-
ipRestrictions
An IP restriction is a restriction placed on the CIDRs that are allowed to initiate 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. See also https://ngrok.com/docs/api#api-ip-restrictions.- Returns:
- a service client
-
reservedAddrs
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. See also https://ngrok.com/docs/api#api-reserved-addrs.- Returns:
- a service client
-
reservedDomains
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. See also https://ngrok.com/docs/api#api-reserved-domains.- Returns:
- a service client
-
sshCertificateAuthorities
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. See also https://ngrok.com/docs/api#api-ssh-certificate-authorities.- Returns:
- a service client
-
sshCredentials
SSH Credentials are SSH public keys that can be used to start SSH tunnels via the ngrok SSH tunnel gateway. See also https://ngrok.com/docs/api#api-ssh-credentials.- Returns:
- a service client
-
sshHostCertificates
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. See also https://ngrok.com/docs/api#api-ssh-host-certificates.- Returns:
- a service client
-
sshUserCertificates
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. See also https://ngrok.com/docs/api#api-ssh-user-certificates.- Returns:
- a service client
-
tlsCertificates
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. See also https://ngrok.com/docs/api#api-tls-certificates.- Returns:
- a service client
-
tunnelSessions
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. See also https://ngrok.com/docs/api#api-tunnel-sessions.- Returns:
- a service client
-
tunnels
Tunnels provide endpoints to access services exposed by a running ngrok agent tunnel session or an SSH reverse tunnel session. See also https://ngrok.com/docs/api#api-tunnels.- Returns:
- a service client
-
backends
Creates a namespace object for Backends.- Returns:
- a namespace object
-
edges
Creates a namespace object for Edges.- Returns:
- a namespace object
-
edgeModules
Creates a namespace object for EdgeModules.- Returns:
- a namespace object
-