ngrok-api 0.14.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/doc/NgrokAPI/Client.html +325 -267
- data/doc/NgrokAPI/Error.html +3 -3
- data/doc/NgrokAPI/Errors/NotFoundError.html +3 -3
- data/doc/NgrokAPI/Errors.html +3 -3
- data/doc/NgrokAPI/HttpClient.html +30 -36
- data/doc/NgrokAPI/Models/APIKey.html +3 -3
- data/doc/NgrokAPI/Models/AWSAuth.html +3 -3
- data/doc/NgrokAPI/Models/AWSCredentials.html +3 -3
- data/doc/NgrokAPI/Models/AWSRole.html +3 -3
- data/doc/NgrokAPI/Models/AbuseReport.html +3 -3
- data/doc/NgrokAPI/Models/AbuseReportHostname.html +3 -3
- data/doc/NgrokAPI/Models/AgentIngress.html +1217 -0
- data/doc/NgrokAPI/Models/CertificateAuthority.html +3 -3
- data/doc/NgrokAPI/Models/Credential.html +3 -3
- data/doc/NgrokAPI/Models/Endpoint.html +1431 -0
- data/doc/NgrokAPI/Models/{EndpointLogging.html → EndpointBackend.html} +42 -42
- data/{docs/NgrokAPI/Models/EndpointLoggingMutate.html → doc/NgrokAPI/Models/EndpointBackendMutate.html} +42 -42
- data/doc/NgrokAPI/Models/EndpointCircuitBreaker.html +3 -3
- data/doc/NgrokAPI/Models/EndpointCompression.html +3 -3
- data/doc/NgrokAPI/Models/EndpointIPPolicy.html +3 -3
- data/doc/NgrokAPI/Models/EndpointIPPolicyMutate.html +3 -3
- data/doc/NgrokAPI/Models/EndpointMutualTLS.html +3 -3
- data/doc/NgrokAPI/Models/EndpointMutualTLSMutate.html +3 -3
- data/doc/NgrokAPI/Models/EndpointOAuth.html +3 -3
- data/doc/NgrokAPI/Models/EndpointOAuthFacebook.html +3 -3
- data/doc/NgrokAPI/Models/EndpointOAuthGitHub.html +3 -3
- data/doc/NgrokAPI/Models/EndpointOAuthGoogle.html +3 -3
- data/doc/NgrokAPI/Models/EndpointOAuthMicrosoft.html +3 -3
- data/doc/NgrokAPI/Models/EndpointOAuthProvider.html +3 -3
- data/doc/NgrokAPI/Models/EndpointOIDC.html +3 -3
- data/doc/NgrokAPI/Models/EndpointRequestHeaders.html +3 -3
- data/doc/NgrokAPI/Models/EndpointResponseHeaders.html +3 -3
- data/doc/NgrokAPI/Models/EndpointSAML.html +3 -3
- data/doc/NgrokAPI/Models/EndpointSAMLMutate.html +3 -3
- data/doc/NgrokAPI/Models/EndpointTLSTermination.html +3 -3
- data/doc/NgrokAPI/Models/EndpointTLSTerminationAtEdge.html +617 -0
- data/doc/NgrokAPI/Models/EndpointWebhookValidation.html +3 -3
- data/doc/NgrokAPI/Models/EndpointWebsocketTCPConverter.html +543 -0
- data/doc/NgrokAPI/Models/EventDestination.html +7 -7
- data/doc/NgrokAPI/Models/EventSource.html +3 -3
- data/doc/NgrokAPI/Models/EventSourceList.html +3 -3
- data/doc/NgrokAPI/Models/EventSourceReplace.html +3 -3
- data/doc/NgrokAPI/Models/EventSubscription.html +3 -3
- data/doc/NgrokAPI/Models/EventTarget.html +3 -3
- data/doc/NgrokAPI/Models/EventTargetCloudwatchLogs.html +3 -3
- data/doc/NgrokAPI/Models/EventTargetFirehose.html +3 -3
- data/doc/NgrokAPI/Models/EventTargetKinesis.html +3 -3
- data/doc/NgrokAPI/Models/FailoverBackend.html +1075 -0
- data/doc/NgrokAPI/Models/HTTPResponseBackend.html +1231 -0
- data/{docs/NgrokAPI/Models/EventStream.html → doc/NgrokAPI/Models/HTTPSEdge.html} +119 -119
- data/doc/NgrokAPI/Models/{EndpointConfiguration.html → HTTPSEdgeRoute.html} +203 -265
- data/doc/NgrokAPI/Models/IPPolicy.html +3 -3
- data/doc/NgrokAPI/Models/IPPolicyRule.html +97 -23
- data/doc/NgrokAPI/Models/IPRestriction.html +3 -3
- data/doc/NgrokAPI/Models/Listable.html +3 -3
- data/doc/NgrokAPI/Models/Ref.html +3 -3
- data/doc/NgrokAPI/Models/ReservedAddr.html +3 -3
- data/doc/NgrokAPI/Models/ReservedDomain.html +3 -3
- data/doc/NgrokAPI/Models/ReservedDomainCertJob.html +3 -3
- data/doc/NgrokAPI/Models/ReservedDomainCertPolicy.html +3 -3
- data/doc/NgrokAPI/Models/ReservedDomainCertStatus.html +3 -3
- data/doc/NgrokAPI/Models/SSHCertificateAuthority.html +3 -3
- data/doc/NgrokAPI/Models/SSHCredential.html +3 -3
- data/doc/NgrokAPI/Models/SSHHostCertificate.html +3 -3
- data/doc/NgrokAPI/Models/SSHUserCertificate.html +3 -3
- data/doc/NgrokAPI/Models/TCPEdge.html +1235 -0
- data/doc/NgrokAPI/Models/TLSCertificate.html +3 -3
- data/doc/NgrokAPI/Models/TLSCertificateSANs.html +3 -3
- data/doc/NgrokAPI/Models/TLSEdge.html +1395 -0
- data/doc/NgrokAPI/Models/Tunnel.html +314 -18
- data/doc/NgrokAPI/Models/TunnelGroupBackend.html +1149 -0
- data/doc/NgrokAPI/Models/TunnelSession.html +3 -3
- data/doc/NgrokAPI/Models/{IPWhitelistEntry.html → WeightedBackend.html} +80 -74
- data/doc/NgrokAPI/Models.html +5 -5
- data/doc/NgrokAPI/PagedIterator.html +3 -3
- data/doc/NgrokAPI/Services/APIKeysClient.html +99 -149
- data/doc/NgrokAPI/Services/AbuseReportsClient.html +19 -33
- data/doc/NgrokAPI/Services/{IPWhitelistClient.html → AgentIngressesClient.html} +209 -265
- data/doc/NgrokAPI/Services/CertificateAuthoritiesClient.html +104 -156
- data/doc/NgrokAPI/Services/CredentialsClient.html +108 -164
- data/doc/NgrokAPI/Services/EdgeRouteBackendModuleClient.html +1153 -0
- data/{docs/NgrokAPI/Services/EndpointCircuitBreakerModuleClient.html → doc/NgrokAPI/Services/EdgeRouteCircuitBreakerModuleClient.html} +177 -95
- data/doc/NgrokAPI/Services/{EndpointCompressionModuleClient.html → EdgeRouteCompressionModuleClient.html} +177 -95
- data/doc/NgrokAPI/Services/EdgeRouteIPRestrictionModuleClient.html +1153 -0
- data/doc/NgrokAPI/Services/EdgeRouteOAuthModuleClient.html +1153 -0
- data/{docs/NgrokAPI/Services/EndpointOIDCModuleClient.html → doc/NgrokAPI/Services/EdgeRouteOIDCModuleClient.html} +177 -95
- data/doc/NgrokAPI/Services/EdgeRouteRequestHeadersModuleClient.html +1153 -0
- data/{docs/NgrokAPI/Services/EndpointResponseHeadersModuleClient.html → doc/NgrokAPI/Services/EdgeRouteResponseHeadersModuleClient.html} +177 -95
- data/{docs/NgrokAPI/Services/EndpointSAMLModuleClient.html → doc/NgrokAPI/Services/EdgeRouteSAMLModuleClient.html} +177 -95
- data/doc/NgrokAPI/Services/{EndpointWebhookValidationModuleClient.html → EdgeRouteWebhookVerificationModuleClient.html} +177 -95
- data/doc/NgrokAPI/Services/EdgeRouteWebsocketTCPConverterModuleClient.html +1153 -0
- data/doc/NgrokAPI/Services/{EventStreamsClient.html → EdgesHTTPSClient.html} +248 -353
- data/{docs/NgrokAPI/Services/EndpointConfigurationsClient.html → doc/NgrokAPI/Services/EdgesHTTPSRoutesClient.html} +461 -761
- data/doc/NgrokAPI/Services/EdgesTCPClient.html +1757 -0
- data/doc/NgrokAPI/Services/EdgesTLSClient.html +1847 -0
- data/doc/NgrokAPI/Services/EndpointsClient.html +907 -0
- data/doc/NgrokAPI/Services/EventDestinationsClient.html +119 -187
- data/doc/NgrokAPI/Services/EventSourcesClient.html +95 -157
- data/doc/NgrokAPI/Services/EventSubscriptionsClient.html +116 -178
- data/doc/NgrokAPI/Services/FailoverBackendsClient.html +1644 -0
- data/doc/NgrokAPI/Services/HTTPResponseBackendsClient.html +1744 -0
- data/doc/NgrokAPI/Services/{EndpointSAMLModuleClient.html → HTTPSEdgeMutualTLSModuleClient.html} +101 -129
- data/doc/NgrokAPI/Services/{EndpointRequestHeadersModuleClient.html → HTTPSEdgeTLSTerminationModuleClient.html} +101 -129
- data/doc/NgrokAPI/Services/IPPoliciesClient.html +114 -184
- data/doc/NgrokAPI/Services/IPPolicyRulesClient.html +126 -164
- data/doc/NgrokAPI/Services/IPRestrictionsClient.html +117 -181
- data/doc/NgrokAPI/Services/ReservedAddrsClient.html +117 -473
- data/doc/NgrokAPI/Services/ReservedDomainsClient.html +209 -899
- data/doc/NgrokAPI/Services/SSHCertificateAuthoritiesClient.html +110 -166
- data/doc/NgrokAPI/Services/SSHCredentialsClient.html +111 -169
- data/doc/NgrokAPI/Services/SSHHostCertificatesClient.html +111 -171
- data/doc/NgrokAPI/Services/SSHUserCertificatesClient.html +111 -175
- data/{docs/NgrokAPI/Services/EndpointLoggingModuleClient.html → doc/NgrokAPI/Services/TCPEdgeBackendModuleClient.html} +101 -129
- data/{docs/NgrokAPI/Services/EndpointIPPolicyModuleClient.html → doc/NgrokAPI/Services/TCPEdgeIPRestrictionModuleClient.html} +83 -111
- data/doc/NgrokAPI/Services/TLSCertificatesClient.html +107 -161
- data/doc/NgrokAPI/Services/{EndpointLoggingModuleClient.html → TLSEdgeBackendModuleClient.html} +101 -129
- data/doc/NgrokAPI/Services/{EndpointIPPolicyModuleClient.html → TLSEdgeIPRestrictionModuleClient.html} +83 -111
- data/{docs/NgrokAPI/Services/EndpointMutualTLSModuleClient.html → doc/NgrokAPI/Services/TLSEdgeMutualTLSModuleClient.html} +83 -111
- data/{docs/NgrokAPI/Services/EndpointTLSTerminationModuleClient.html → doc/NgrokAPI/Services/TLSEdgeTLSTerminationModuleClient.html} +83 -111
- data/doc/NgrokAPI/Services/TunnelGroupBackendsClient.html +1644 -0
- data/doc/NgrokAPI/Services/TunnelSessionsClient.html +87 -135
- data/doc/NgrokAPI/Services/TunnelsClient.html +252 -26
- data/doc/NgrokAPI/Services/WeightedBackendsClient.html +1644 -0
- data/doc/NgrokAPI/Services.html +5 -5
- data/doc/NgrokAPI.html +4 -4
- data/doc/_index.html +253 -76
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +3 -3
- data/doc/frames.html +1 -1
- data/doc/index.html +3 -3
- data/doc/method_list.html +3559 -1583
- data/doc/top-level-namespace.html +3 -3
- data/docs/CNAME +1 -0
- data/docs/NgrokAPI/Client.html +325 -267
- data/docs/NgrokAPI/Error.html +3 -3
- data/docs/NgrokAPI/Errors/NotFoundError.html +3 -3
- data/docs/NgrokAPI/Errors.html +3 -3
- data/docs/NgrokAPI/HttpClient.html +30 -36
- data/docs/NgrokAPI/Models/APIKey.html +3 -3
- data/docs/NgrokAPI/Models/AWSAuth.html +3 -3
- data/docs/NgrokAPI/Models/AWSCredentials.html +3 -3
- data/docs/NgrokAPI/Models/AWSRole.html +3 -3
- data/docs/NgrokAPI/Models/AbuseReport.html +3 -3
- data/docs/NgrokAPI/Models/AbuseReportHostname.html +3 -3
- data/docs/NgrokAPI/Models/AgentIngress.html +1217 -0
- data/docs/NgrokAPI/Models/CertificateAuthority.html +3 -3
- data/docs/NgrokAPI/Models/Credential.html +3 -3
- data/docs/NgrokAPI/Models/Endpoint.html +1431 -0
- data/docs/NgrokAPI/Models/{EndpointLogging.html → EndpointBackend.html} +42 -42
- data/{doc/NgrokAPI/Models/EndpointLoggingMutate.html → docs/NgrokAPI/Models/EndpointBackendMutate.html} +42 -42
- data/docs/NgrokAPI/Models/EndpointCircuitBreaker.html +3 -3
- data/docs/NgrokAPI/Models/EndpointCompression.html +3 -3
- data/docs/NgrokAPI/Models/EndpointIPPolicy.html +3 -3
- data/docs/NgrokAPI/Models/EndpointIPPolicyMutate.html +3 -3
- data/docs/NgrokAPI/Models/EndpointMutualTLS.html +3 -3
- data/docs/NgrokAPI/Models/EndpointMutualTLSMutate.html +3 -3
- data/docs/NgrokAPI/Models/EndpointOAuth.html +3 -3
- data/docs/NgrokAPI/Models/EndpointOAuthFacebook.html +3 -3
- data/docs/NgrokAPI/Models/EndpointOAuthGitHub.html +3 -3
- data/docs/NgrokAPI/Models/EndpointOAuthGoogle.html +3 -3
- data/docs/NgrokAPI/Models/EndpointOAuthMicrosoft.html +3 -3
- data/docs/NgrokAPI/Models/EndpointOAuthProvider.html +3 -3
- data/docs/NgrokAPI/Models/EndpointOIDC.html +3 -3
- data/docs/NgrokAPI/Models/EndpointRequestHeaders.html +3 -3
- data/docs/NgrokAPI/Models/EndpointResponseHeaders.html +3 -3
- data/docs/NgrokAPI/Models/EndpointSAML.html +3 -3
- data/docs/NgrokAPI/Models/EndpointSAMLMutate.html +3 -3
- data/docs/NgrokAPI/Models/EndpointTLSTermination.html +3 -3
- data/docs/NgrokAPI/Models/EndpointTLSTerminationAtEdge.html +617 -0
- data/docs/NgrokAPI/Models/EndpointWebhookValidation.html +3 -3
- data/docs/NgrokAPI/Models/EndpointWebsocketTCPConverter.html +543 -0
- data/docs/NgrokAPI/Models/EventDestination.html +7 -7
- data/docs/NgrokAPI/Models/EventSource.html +3 -3
- data/docs/NgrokAPI/Models/EventSourceList.html +3 -3
- data/docs/NgrokAPI/Models/EventSourceReplace.html +3 -3
- data/docs/NgrokAPI/Models/EventSubscription.html +3 -3
- data/docs/NgrokAPI/Models/EventTarget.html +3 -3
- data/docs/NgrokAPI/Models/EventTargetCloudwatchLogs.html +3 -3
- data/docs/NgrokAPI/Models/EventTargetFirehose.html +3 -3
- data/docs/NgrokAPI/Models/EventTargetKinesis.html +3 -3
- data/docs/NgrokAPI/Models/FailoverBackend.html +1075 -0
- data/docs/NgrokAPI/Models/HTTPResponseBackend.html +1231 -0
- data/{doc/NgrokAPI/Models/EventStream.html → docs/NgrokAPI/Models/HTTPSEdge.html} +119 -119
- data/docs/NgrokAPI/Models/{EndpointConfiguration.html → HTTPSEdgeRoute.html} +203 -265
- data/docs/NgrokAPI/Models/IPPolicy.html +3 -3
- data/docs/NgrokAPI/Models/IPPolicyRule.html +97 -23
- data/docs/NgrokAPI/Models/IPRestriction.html +3 -3
- data/docs/NgrokAPI/Models/Listable.html +3 -3
- data/docs/NgrokAPI/Models/Ref.html +3 -3
- data/docs/NgrokAPI/Models/ReservedAddr.html +3 -3
- data/docs/NgrokAPI/Models/ReservedDomain.html +3 -3
- data/docs/NgrokAPI/Models/ReservedDomainCertJob.html +3 -3
- data/docs/NgrokAPI/Models/ReservedDomainCertPolicy.html +3 -3
- data/docs/NgrokAPI/Models/ReservedDomainCertStatus.html +3 -3
- data/docs/NgrokAPI/Models/SSHCertificateAuthority.html +3 -3
- data/docs/NgrokAPI/Models/SSHCredential.html +3 -3
- data/docs/NgrokAPI/Models/SSHHostCertificate.html +3 -3
- data/docs/NgrokAPI/Models/SSHUserCertificate.html +3 -3
- data/docs/NgrokAPI/Models/TCPEdge.html +1235 -0
- data/docs/NgrokAPI/Models/TLSCertificate.html +3 -3
- data/docs/NgrokAPI/Models/TLSCertificateSANs.html +3 -3
- data/docs/NgrokAPI/Models/TLSEdge.html +1395 -0
- data/docs/NgrokAPI/Models/Tunnel.html +314 -18
- data/docs/NgrokAPI/Models/TunnelGroupBackend.html +1149 -0
- data/docs/NgrokAPI/Models/TunnelSession.html +3 -3
- data/docs/NgrokAPI/Models/{IPWhitelistEntry.html → WeightedBackend.html} +80 -74
- data/docs/NgrokAPI/Models.html +5 -5
- data/docs/NgrokAPI/PagedIterator.html +3 -3
- data/docs/NgrokAPI/Services/APIKeysClient.html +99 -149
- data/docs/NgrokAPI/Services/AbuseReportsClient.html +19 -33
- data/docs/NgrokAPI/Services/{IPWhitelistClient.html → AgentIngressesClient.html} +209 -265
- data/docs/NgrokAPI/Services/CertificateAuthoritiesClient.html +104 -156
- data/docs/NgrokAPI/Services/CredentialsClient.html +108 -164
- data/docs/NgrokAPI/Services/EdgeRouteBackendModuleClient.html +1153 -0
- data/{doc/NgrokAPI/Services/EndpointCircuitBreakerModuleClient.html → docs/NgrokAPI/Services/EdgeRouteCircuitBreakerModuleClient.html} +177 -95
- data/docs/NgrokAPI/Services/{EndpointCompressionModuleClient.html → EdgeRouteCompressionModuleClient.html} +177 -95
- data/docs/NgrokAPI/Services/EdgeRouteIPRestrictionModuleClient.html +1153 -0
- data/docs/NgrokAPI/Services/EdgeRouteOAuthModuleClient.html +1153 -0
- data/docs/NgrokAPI/Services/EdgeRouteOIDCModuleClient.html +1153 -0
- data/docs/NgrokAPI/Services/EdgeRouteRequestHeadersModuleClient.html +1153 -0
- data/{doc/NgrokAPI/Services/EndpointResponseHeadersModuleClient.html → docs/NgrokAPI/Services/EdgeRouteResponseHeadersModuleClient.html} +177 -95
- data/docs/NgrokAPI/Services/EdgeRouteSAMLModuleClient.html +1153 -0
- data/docs/NgrokAPI/Services/{EndpointWebhookValidationModuleClient.html → EdgeRouteWebhookVerificationModuleClient.html} +177 -95
- data/docs/NgrokAPI/Services/EdgeRouteWebsocketTCPConverterModuleClient.html +1153 -0
- data/docs/NgrokAPI/Services/{EventStreamsClient.html → EdgesHTTPSClient.html} +248 -353
- data/{doc/NgrokAPI/Services/EndpointConfigurationsClient.html → docs/NgrokAPI/Services/EdgesHTTPSRoutesClient.html} +461 -761
- data/docs/NgrokAPI/Services/EdgesTCPClient.html +1757 -0
- data/docs/NgrokAPI/Services/EdgesTLSClient.html +1847 -0
- data/docs/NgrokAPI/Services/EndpointsClient.html +907 -0
- data/docs/NgrokAPI/Services/EventDestinationsClient.html +119 -187
- data/docs/NgrokAPI/Services/EventSourcesClient.html +95 -157
- data/docs/NgrokAPI/Services/EventSubscriptionsClient.html +116 -178
- data/docs/NgrokAPI/Services/FailoverBackendsClient.html +1644 -0
- data/docs/NgrokAPI/Services/HTTPResponseBackendsClient.html +1744 -0
- data/{doc/NgrokAPI/Services/EndpointOIDCModuleClient.html → docs/NgrokAPI/Services/HTTPSEdgeMutualTLSModuleClient.html} +101 -129
- data/docs/NgrokAPI/Services/{EndpointRequestHeadersModuleClient.html → HTTPSEdgeTLSTerminationModuleClient.html} +101 -129
- data/docs/NgrokAPI/Services/IPPoliciesClient.html +114 -184
- data/docs/NgrokAPI/Services/IPPolicyRulesClient.html +126 -164
- data/docs/NgrokAPI/Services/IPRestrictionsClient.html +117 -181
- data/docs/NgrokAPI/Services/ReservedAddrsClient.html +117 -473
- data/docs/NgrokAPI/Services/ReservedDomainsClient.html +209 -899
- data/docs/NgrokAPI/Services/SSHCertificateAuthoritiesClient.html +110 -166
- data/docs/NgrokAPI/Services/SSHCredentialsClient.html +111 -169
- data/docs/NgrokAPI/Services/SSHHostCertificatesClient.html +111 -171
- data/docs/NgrokAPI/Services/SSHUserCertificatesClient.html +111 -175
- data/{doc/NgrokAPI/Services/EndpointOAuthModuleClient.html → docs/NgrokAPI/Services/TCPEdgeBackendModuleClient.html} +101 -129
- data/docs/NgrokAPI/Services/TCPEdgeIPRestrictionModuleClient.html +1043 -0
- data/docs/NgrokAPI/Services/TLSCertificatesClient.html +107 -161
- data/docs/NgrokAPI/Services/{EndpointOAuthModuleClient.html → TLSEdgeBackendModuleClient.html} +101 -129
- data/docs/NgrokAPI/Services/TLSEdgeIPRestrictionModuleClient.html +1043 -0
- data/{doc/NgrokAPI/Services/EndpointMutualTLSModuleClient.html → docs/NgrokAPI/Services/TLSEdgeMutualTLSModuleClient.html} +83 -111
- data/{doc/NgrokAPI/Services/EndpointTLSTerminationModuleClient.html → docs/NgrokAPI/Services/TLSEdgeTLSTerminationModuleClient.html} +83 -111
- data/docs/NgrokAPI/Services/TunnelGroupBackendsClient.html +1644 -0
- data/docs/NgrokAPI/Services/TunnelSessionsClient.html +87 -135
- data/docs/NgrokAPI/Services/TunnelsClient.html +252 -26
- data/docs/NgrokAPI/Services/WeightedBackendsClient.html +1644 -0
- data/docs/NgrokAPI/Services.html +5 -5
- data/docs/NgrokAPI.html +4 -4
- data/docs/_index.html +253 -76
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +3 -3
- data/docs/frames.html +1 -1
- data/docs/index.html +3 -3
- data/docs/method_list.html +3559 -1583
- data/docs/top-level-namespace.html +3 -3
- data/lib/ngrokapi/client.rb +52 -37
- data/lib/ngrokapi/http_client.rb +1 -4
- data/lib/ngrokapi/models/{ip_whitelist_entry.rb → agent_ingress.rb} +13 -9
- data/lib/ngrokapi/models/endpoint.rb +49 -0
- data/lib/ngrokapi/models/{endpoint_logging.rb → endpoint_backend.rb} +3 -3
- data/lib/ngrokapi/models/{endpoint_logging_mutate.rb → endpoint_backend_mutate.rb} +3 -3
- data/lib/ngrokapi/models/endpoint_tls_termination_at_edge.rb +27 -0
- data/lib/ngrokapi/models/endpoint_websocket_tcp_converter.rb +25 -0
- data/lib/ngrokapi/models/event_destination.rb +1 -2
- data/lib/ngrokapi/models/{event_stream.rb → failover_backend.rb} +15 -27
- data/lib/ngrokapi/models/http_response_backend.rb +71 -0
- data/lib/ngrokapi/models/https_edge.rb +80 -0
- data/lib/ngrokapi/models/{endpoint_configuration.rb → https_edge_route.rb} +56 -53
- data/lib/ngrokapi/models/ip_policy_rule.rb +3 -1
- data/lib/ngrokapi/models/tcp_edge.rb +78 -0
- data/lib/ngrokapi/models/tls_edge.rb +88 -0
- data/lib/ngrokapi/models/tunnel.rb +9 -1
- data/lib/ngrokapi/models/tunnel_group_backend.rb +67 -0
- data/lib/ngrokapi/models/weighted_backend.rb +65 -0
- data/lib/ngrokapi/services/abuse_reports_client.rb +3 -10
- data/lib/ngrokapi/services/agent_ingresses_client.rb +206 -0
- data/lib/ngrokapi/services/api_keys_client.rb +11 -36
- data/lib/ngrokapi/services/certificate_authorities_client.rb +11 -37
- data/lib/ngrokapi/services/credentials_client.rb +11 -39
- data/lib/ngrokapi/services/edge_route_backend_module_client.rb +120 -0
- data/lib/ngrokapi/services/{endpoint_circuit_breaker_module_client.rb → edge_route_circuit_breaker_module_client.rb} +37 -39
- data/lib/ngrokapi/services/{endpoint_compression_module_client.rb → edge_route_compression_module_client.rb} +37 -39
- data/lib/ngrokapi/services/edge_route_ip_restriction_module_client.rb +120 -0
- data/lib/ngrokapi/services/{endpoint_o_auth_module_client.rb → edge_route_o_auth_module_client.rb} +37 -39
- data/lib/ngrokapi/services/{endpoint_oidc_module_client.rb → edge_route_oidc_module_client.rb} +37 -39
- data/lib/ngrokapi/services/{endpoint_request_headers_module_client.rb → edge_route_request_headers_module_client.rb} +37 -39
- data/lib/ngrokapi/services/{endpoint_response_headers_module_client.rb → edge_route_response_headers_module_client.rb} +37 -39
- data/lib/ngrokapi/services/{endpoint_saml_module_client.rb → edge_route_saml_module_client.rb} +37 -39
- data/lib/ngrokapi/services/{endpoint_webhook_validation_module_client.rb → edge_route_webhook_verification_module_client.rb} +37 -39
- data/lib/ngrokapi/services/edge_route_websocket_tcp_converter_module_client.rb +120 -0
- data/lib/ngrokapi/services/edges_https_client.rb +227 -0
- data/lib/ngrokapi/services/edges_https_routes_client.rb +244 -0
- data/lib/ngrokapi/services/edges_tcp_client.rb +227 -0
- data/lib/ngrokapi/services/edges_tls_client.rb +239 -0
- data/lib/ngrokapi/services/endpoints_client.rb +114 -0
- data/lib/ngrokapi/services/event_destinations_client.rb +13 -49
- data/lib/ngrokapi/services/event_sources_client.rb +9 -40
- data/lib/ngrokapi/services/event_subscriptions_client.rb +14 -45
- data/lib/ngrokapi/services/failover_backends_client.rb +214 -0
- data/lib/ngrokapi/services/http_response_backends_client.rb +199 -0
- data/lib/ngrokapi/services/https_edge_mutual_tls_module_client.rb +108 -0
- data/lib/ngrokapi/services/https_edge_tls_termination_module_client.rb +108 -0
- data/lib/ngrokapi/services/ip_policies_client.rb +11 -39
- data/lib/ngrokapi/services/ip_policy_rules_client.rb +13 -40
- data/lib/ngrokapi/services/ip_restrictions_client.rb +12 -44
- data/lib/ngrokapi/services/reserved_addrs_client.rb +11 -81
- data/lib/ngrokapi/services/reserved_domains_client.rb +15 -144
- data/lib/ngrokapi/services/ssh_certificate_authorities_client.rb +11 -39
- data/lib/ngrokapi/services/ssh_credentials_client.rb +11 -40
- data/lib/ngrokapi/services/ssh_host_certificates_client.rb +11 -41
- data/lib/ngrokapi/services/ssh_user_certificates_client.rb +11 -43
- data/lib/ngrokapi/services/{endpoint_logging_module_client.rb → tcp_edge_backend_module_client.rb} +31 -45
- data/lib/ngrokapi/services/{endpoint_ip_policy_module_client.rb → tcp_edge_ip_restriction_module_client.rb} +21 -35
- data/lib/ngrokapi/services/tls_certificates_client.rb +11 -38
- data/lib/ngrokapi/services/tls_edge_backend_module_client.rb +108 -0
- data/lib/ngrokapi/services/tls_edge_ip_restriction_module_client.rb +108 -0
- data/lib/ngrokapi/services/{endpoint_mutual_tls_module_client.rb → tls_edge_mutual_tls_module_client.rb} +21 -35
- data/lib/ngrokapi/services/{endpoint_tls_termination_module_client.rb → tls_edge_tls_termination_module_client.rb} +21 -35
- data/lib/ngrokapi/services/{ip_whitelist_client.rb → tunnel_group_backends_client.rb} +70 -93
- data/lib/ngrokapi/services/tunnel_sessions_client.rb +12 -36
- data/lib/ngrokapi/services/tunnels_client.rb +39 -10
- data/lib/ngrokapi/services/weighted_backends_client.rb +214 -0
- data/lib/ngrokapi/version.rb +1 -1
- data/lib/ngrokapi.rb +1 -1
- data/ngrok-api.gemspec +1 -1
- data/spec/ngrokapi/client_spec.rb +50 -29
- data/spec/ngrokapi/models/agent_ingress_spec.rb +42 -0
- data/spec/ngrokapi/models/endpoint_backend_mutate_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_backend_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_tls_termination_at_edge_spec.rb +21 -0
- data/spec/ngrokapi/models/endpoint_websocket_tcp_converter_spec.rb +21 -0
- data/spec/ngrokapi/models/failover_backend_spec.rb +45 -0
- data/spec/ngrokapi/models/http_response_backend_spec.rb +51 -0
- data/spec/ngrokapi/models/https_edge_route_spec.rb +81 -0
- data/spec/ngrokapi/models/https_edge_spec.rb +51 -0
- data/spec/ngrokapi/models/tcp_edge_spec.rb +51 -0
- data/spec/ngrokapi/models/tls_edge_spec.rb +57 -0
- data/spec/ngrokapi/models/tunnel_group_backend_spec.rb +45 -0
- data/spec/ngrokapi/models/weighted_backend_spec.rb +45 -0
- data/spec/ngrokapi/services/{ip_whitelist_client_spec.rb → agent_ingresses_client_spec.rb} +49 -49
- data/spec/ngrokapi/services/edge_route_backend_module_client_spec.rb +139 -0
- data/spec/ngrokapi/services/{endpoint_circuit_breaker_module_client_spec.rb → edge_route_circuit_breaker_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/{endpoint_compression_module_client_spec.rb → edge_route_compression_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/edge_route_ip_restriction_module_client_spec.rb +139 -0
- data/spec/ngrokapi/services/{endpoint_o_auth_module_client_spec.rb → edge_route_o_auth_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/{endpoint_oidc_module_client_spec.rb → edge_route_oidc_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/{endpoint_request_headers_module_client_spec.rb → edge_route_request_headers_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/{endpoint_response_headers_module_client_spec.rb → edge_route_response_headers_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/{endpoint_saml_module_client_spec.rb → edge_route_saml_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/{endpoint_webhook_validation_module_client_spec.rb → edge_route_webhook_verification_module_client_spec.rb} +31 -17
- data/spec/ngrokapi/services/edge_route_websocket_tcp_converter_module_client_spec.rb +139 -0
- data/spec/ngrokapi/services/{event_streams_client_spec.rb → edges_https_client_spec.rb} +106 -108
- data/spec/ngrokapi/services/edges_https_routes_client_spec.rb +241 -0
- data/spec/ngrokapi/services/edges_tcp_client_spec.rb +175 -0
- data/spec/ngrokapi/services/edges_tls_client_spec.rb +187 -0
- data/spec/ngrokapi/services/endpoints_client_spec.rb +57 -0
- data/spec/ngrokapi/services/failover_backends_client_spec.rb +163 -0
- data/spec/ngrokapi/services/http_response_backends_client_spec.rb +175 -0
- data/spec/ngrokapi/services/{endpoint_mutual_tls_module_client_spec.rb → https_edge_mutual_tls_module_client_spec.rb} +17 -17
- data/spec/ngrokapi/services/{endpoint_tls_termination_module_client_spec.rb → https_edge_tls_termination_module_client_spec.rb} +17 -17
- data/spec/ngrokapi/services/ip_policies_client_spec.rb +0 -1
- data/spec/ngrokapi/services/ip_policy_rules_client_spec.rb +3 -1
- data/spec/ngrokapi/services/reserved_addrs_client_spec.rb +0 -44
- data/spec/ngrokapi/services/reserved_domains_client_spec.rb +0 -88
- data/spec/ngrokapi/services/{endpoint_logging_module_client_spec.rb → tcp_edge_backend_module_client_spec.rb} +40 -40
- data/spec/ngrokapi/services/{endpoint_ip_policy_module_client_spec.rb → tcp_edge_ip_restriction_module_client_spec.rb} +17 -17
- data/spec/ngrokapi/services/tls_edge_backend_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/tls_edge_ip_restriction_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/tls_edge_mutual_tls_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/tls_edge_tls_termination_module_client_spec.rb +125 -0
- data/spec/ngrokapi/services/tunnel_group_backends_client_spec.rb +163 -0
- data/spec/ngrokapi/services/tunnels_client_spec.rb +36 -0
- data/spec/ngrokapi/services/weighted_backends_client_spec.rb +163 -0
- data/spec/spec_helper.rb +1389 -1045
- metadata +176 -83
- data/lib/ngrokapi/services/endpoint_configurations_client.rb +0 -357
- data/lib/ngrokapi/services/event_streams_client.rb +0 -259
- data/spec/ngrokapi/models/endpoint_configuration_spec.rb +0 -78
- data/spec/ngrokapi/models/endpoint_logging_mutate_spec.rb +0 -21
- data/spec/ngrokapi/models/endpoint_logging_spec.rb +0 -21
- data/spec/ngrokapi/models/event_stream_spec.rb +0 -51
- data/spec/ngrokapi/models/ip_whitelist_entry_spec.rb +0 -42
- data/spec/ngrokapi/services/endpoint_configurations_client_spec.rb +0 -237
@@ -1,357 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module NgrokAPI
|
4
|
-
module Services
|
5
|
-
##
|
6
|
-
# Endpoint Configurations are a reusable group of modules that encapsulate how
|
7
|
-
# traffic to a domain or address is handled. Endpoint configurations are only
|
8
|
-
# applied to Domains and TCP Addresses they have been attached to.
|
9
|
-
#
|
10
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations
|
11
|
-
class EndpointConfigurationsClient
|
12
|
-
# The API path for the requests
|
13
|
-
PATH = '/endpoint_configurations'
|
14
|
-
# The List Property from the resulting API for list calls
|
15
|
-
LIST_PROPERTY = 'endpoint_configurations'
|
16
|
-
|
17
|
-
attr_reader :client
|
18
|
-
|
19
|
-
def initialize(client:)
|
20
|
-
@client = client
|
21
|
-
end
|
22
|
-
|
23
|
-
##
|
24
|
-
# Create a new endpoint configuration
|
25
|
-
#
|
26
|
-
# @param [string] type they type of traffic this endpoint configuration can be applied to. one of: ``http``, ``https``, ``tcp``
|
27
|
-
# @param [string] 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
|
28
|
-
# @param [string] metadata arbitrary user-defined machine-readable data of this endpoint configuration. Optional, max 4096 bytes.
|
29
|
-
# @param [EndpointCircuitBreaker] circuit_breaker circuit breaker module configuration or ``null``
|
30
|
-
# @param [EndpointCompression] compression compression module configuration or ``null``
|
31
|
-
# @param [EndpointRequestHeaders] request_headers request headers module configuration or ``null``
|
32
|
-
# @param [EndpointResponseHeaders] response_headers response headers module configuration or ``null``
|
33
|
-
# @param [EndpointIPPolicyMutate] ip_policy ip policy module configuration or ``null``
|
34
|
-
# @param [EndpointMutualTLSMutate] mutual_tls mutual TLS module configuration or ``null``
|
35
|
-
# @param [EndpointTLSTermination] tls_termination TLS termination module configuration or ``null``
|
36
|
-
# @param [EndpointWebhookValidation] webhook_validation webhook validation module configuration or ``null``
|
37
|
-
# @param [EndpointOAuth] oauth oauth module configuration or ``null``
|
38
|
-
# @param [EndpointLoggingMutate] logging logging module configuration or ``null``
|
39
|
-
# @param [EndpointSAMLMutate] saml saml module configuration or ``null``
|
40
|
-
# @param [EndpointOIDC] oidc oidc module configuration or ``null``
|
41
|
-
# @return [NgrokAPI::Models::EndpointConfiguration] result from the API request
|
42
|
-
#
|
43
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-create
|
44
|
-
def create(
|
45
|
-
type: "",
|
46
|
-
description: "",
|
47
|
-
metadata: "",
|
48
|
-
basic_auth: nil,
|
49
|
-
circuit_breaker: nil,
|
50
|
-
compression: nil,
|
51
|
-
request_headers: nil,
|
52
|
-
response_headers: nil,
|
53
|
-
ip_policy: nil,
|
54
|
-
mutual_tls: nil,
|
55
|
-
tls_termination: nil,
|
56
|
-
webhook_validation: nil,
|
57
|
-
oauth: nil,
|
58
|
-
logging: nil,
|
59
|
-
saml: nil,
|
60
|
-
oidc: nil,
|
61
|
-
backend: nil
|
62
|
-
)
|
63
|
-
path = '/endpoint_configurations'
|
64
|
-
replacements = {
|
65
|
-
}
|
66
|
-
data = {}
|
67
|
-
data[:type] = type if type
|
68
|
-
data[:description] = description if description
|
69
|
-
data[:metadata] = metadata if metadata
|
70
|
-
data[:circuit_breaker] = circuit_breaker if circuit_breaker
|
71
|
-
data[:compression] = compression if compression
|
72
|
-
data[:request_headers] = request_headers if request_headers
|
73
|
-
data[:response_headers] = response_headers if response_headers
|
74
|
-
data[:ip_policy] = ip_policy if ip_policy
|
75
|
-
data[:mutual_tls] = mutual_tls if mutual_tls
|
76
|
-
data[:tls_termination] = tls_termination if tls_termination
|
77
|
-
data[:webhook_validation] = webhook_validation if webhook_validation
|
78
|
-
data[:oauth] = oauth if oauth
|
79
|
-
data[:logging] = logging if logging
|
80
|
-
data[:saml] = saml if saml
|
81
|
-
data[:oidc] = oidc if oidc
|
82
|
-
result = @client.post(path % replacements, data: data)
|
83
|
-
NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result)
|
84
|
-
end
|
85
|
-
|
86
|
-
##
|
87
|
-
# Delete an endpoint configuration. This operation will fail if the endpoint
|
88
|
-
# configuration is still referenced by any reserved domain or reserved address.
|
89
|
-
#
|
90
|
-
# @param [string] id a resource identifier
|
91
|
-
# @return [NgrokAPI::Models::Empty] result from the API request
|
92
|
-
#
|
93
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-delete
|
94
|
-
def delete(
|
95
|
-
id: ""
|
96
|
-
)
|
97
|
-
path = '/endpoint_configurations/%{id}'
|
98
|
-
replacements = {
|
99
|
-
id: id,
|
100
|
-
}
|
101
|
-
@client.delete(path % replacements)
|
102
|
-
end
|
103
|
-
|
104
|
-
##
|
105
|
-
# Delete an endpoint configuration. This operation will fail if the endpoint
|
106
|
-
# configuration is still referenced by any reserved domain or reserved address.
|
107
|
-
# Throws an exception if API error.
|
108
|
-
#
|
109
|
-
# @param [string] id a resource identifier
|
110
|
-
# @return [NgrokAPI::Models::Empty] result from the API request
|
111
|
-
#
|
112
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-delete
|
113
|
-
def delete!(
|
114
|
-
id: ""
|
115
|
-
)
|
116
|
-
path = '/endpoint_configurations/%{id}'
|
117
|
-
replacements = {
|
118
|
-
id: id,
|
119
|
-
}
|
120
|
-
@client.delete(path % replacements, danger: true)
|
121
|
-
end
|
122
|
-
|
123
|
-
##
|
124
|
-
# Returns detailed information about an endpoint configuration
|
125
|
-
#
|
126
|
-
# @param [string] id a resource identifier
|
127
|
-
# @return [NgrokAPI::Models::EndpointConfiguration] result from the API request
|
128
|
-
#
|
129
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-get
|
130
|
-
def get(
|
131
|
-
id: ""
|
132
|
-
)
|
133
|
-
path = '/endpoint_configurations/%{id}'
|
134
|
-
replacements = {
|
135
|
-
id: id,
|
136
|
-
}
|
137
|
-
data = {}
|
138
|
-
result = @client.get(path % replacements, data: data)
|
139
|
-
NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result)
|
140
|
-
end
|
141
|
-
|
142
|
-
##
|
143
|
-
# Returns detailed information about an endpoint configuration
|
144
|
-
# Throws an exception if API error.
|
145
|
-
#
|
146
|
-
# @param [string] id a resource identifier
|
147
|
-
# @return [NgrokAPI::Models::EndpointConfiguration] result from the API request
|
148
|
-
#
|
149
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-get
|
150
|
-
def get!(
|
151
|
-
id: ""
|
152
|
-
)
|
153
|
-
path = '/endpoint_configurations/%{id}'
|
154
|
-
replacements = {
|
155
|
-
id: id,
|
156
|
-
}
|
157
|
-
data = {}
|
158
|
-
result = @client.get(path % replacements, data: data, danger: true)
|
159
|
-
NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result)
|
160
|
-
end
|
161
|
-
|
162
|
-
##
|
163
|
-
# Returns a list of all endpoint configurations on this account
|
164
|
-
#
|
165
|
-
# @param [string] before_id
|
166
|
-
# @param [string] limit
|
167
|
-
# @param [string] url optional and mutually exclusive from before_id and limit
|
168
|
-
# @return [NgrokAPI::Models::Listable] result from the API request
|
169
|
-
#
|
170
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-list
|
171
|
-
def list(
|
172
|
-
before_id: nil,
|
173
|
-
limit: nil,
|
174
|
-
url: nil
|
175
|
-
)
|
176
|
-
result = @client.list(
|
177
|
-
before_id: before_id,
|
178
|
-
limit: limit,
|
179
|
-
url: url,
|
180
|
-
path: PATH
|
181
|
-
)
|
182
|
-
|
183
|
-
NgrokAPI::Models::Listable.new(
|
184
|
-
client: self,
|
185
|
-
result: result,
|
186
|
-
list_property: LIST_PROPERTY,
|
187
|
-
klass: NgrokAPI::Models::EndpointConfiguration
|
188
|
-
)
|
189
|
-
end
|
190
|
-
|
191
|
-
##
|
192
|
-
# Returns a list of all endpoint configurations on this account
|
193
|
-
# Throws an exception if API error.
|
194
|
-
#
|
195
|
-
# @param [string] before_id
|
196
|
-
# @param [string] limit
|
197
|
-
# @param [string] url optional and mutually exclusive from before_id and limit
|
198
|
-
# @return [NgrokAPI::Models::Listable] result from the API request
|
199
|
-
#
|
200
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-list
|
201
|
-
def list!(
|
202
|
-
before_id: nil,
|
203
|
-
limit: nil,
|
204
|
-
url: nil
|
205
|
-
)
|
206
|
-
result = @client.list(
|
207
|
-
before_id: before_id,
|
208
|
-
limit: limit,
|
209
|
-
danger: true,
|
210
|
-
url: url,
|
211
|
-
path: PATH
|
212
|
-
)
|
213
|
-
|
214
|
-
NgrokAPI::Models::Listable.new(
|
215
|
-
client: self,
|
216
|
-
result: result,
|
217
|
-
list_property: LIST_PROPERTY,
|
218
|
-
klass: NgrokAPI::Models::EndpointConfiguration,
|
219
|
-
danger: true
|
220
|
-
)
|
221
|
-
end
|
222
|
-
|
223
|
-
##
|
224
|
-
# Updates an endpoint configuration. If a module is not specified in the update,
|
225
|
-
# it will not be modified. However, each module configuration that is specified
|
226
|
-
# will completely replace the existing value. There is no way to delete an
|
227
|
-
# existing module via this API, instead use the delete module API.
|
228
|
-
#
|
229
|
-
# @param [string] id unique identifier of this endpoint configuration
|
230
|
-
# @param [string] 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
|
231
|
-
# @param [string] metadata arbitrary user-defined machine-readable data of this endpoint configuration. Optional, max 4096 bytes.
|
232
|
-
# @param [EndpointCircuitBreaker] circuit_breaker circuit breaker module configuration or ``null``
|
233
|
-
# @param [EndpointCompression] compression compression module configuration or ``null``
|
234
|
-
# @param [EndpointRequestHeaders] request_headers request headers module configuration or ``null``
|
235
|
-
# @param [EndpointResponseHeaders] response_headers response headers module configuration or ``null``
|
236
|
-
# @param [EndpointIPPolicyMutate] ip_policy ip policy module configuration or ``null``
|
237
|
-
# @param [EndpointMutualTLSMutate] mutual_tls mutual TLS module configuration or ``null``
|
238
|
-
# @param [EndpointTLSTermination] tls_termination TLS termination module configuration or ``null``
|
239
|
-
# @param [EndpointWebhookValidation] webhook_validation webhook validation module configuration or ``null``
|
240
|
-
# @param [EndpointOAuth] oauth oauth module configuration or ``null``
|
241
|
-
# @param [EndpointLoggingMutate] logging logging module configuration or ``null``
|
242
|
-
# @param [EndpointSAMLMutate] saml saml module configuration or ``null``
|
243
|
-
# @param [EndpointOIDC] oidc oidc module configuration or ``null``
|
244
|
-
# @return [NgrokAPI::Models::EndpointConfiguration] result from the API request
|
245
|
-
#
|
246
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-update
|
247
|
-
def update(
|
248
|
-
id: "",
|
249
|
-
description: nil,
|
250
|
-
metadata: nil,
|
251
|
-
basic_auth: nil,
|
252
|
-
circuit_breaker: nil,
|
253
|
-
compression: nil,
|
254
|
-
request_headers: nil,
|
255
|
-
response_headers: nil,
|
256
|
-
ip_policy: nil,
|
257
|
-
mutual_tls: nil,
|
258
|
-
tls_termination: nil,
|
259
|
-
webhook_validation: nil,
|
260
|
-
oauth: nil,
|
261
|
-
logging: nil,
|
262
|
-
saml: nil,
|
263
|
-
oidc: nil,
|
264
|
-
backend: nil
|
265
|
-
)
|
266
|
-
path = '/endpoint_configurations/%{id}'
|
267
|
-
replacements = {
|
268
|
-
id: id,
|
269
|
-
}
|
270
|
-
data = {}
|
271
|
-
data[:description] = description if description
|
272
|
-
data[:metadata] = metadata if metadata
|
273
|
-
data[:circuit_breaker] = circuit_breaker if circuit_breaker
|
274
|
-
data[:compression] = compression if compression
|
275
|
-
data[:request_headers] = request_headers if request_headers
|
276
|
-
data[:response_headers] = response_headers if response_headers
|
277
|
-
data[:ip_policy] = ip_policy if ip_policy
|
278
|
-
data[:mutual_tls] = mutual_tls if mutual_tls
|
279
|
-
data[:tls_termination] = tls_termination if tls_termination
|
280
|
-
data[:webhook_validation] = webhook_validation if webhook_validation
|
281
|
-
data[:oauth] = oauth if oauth
|
282
|
-
data[:logging] = logging if logging
|
283
|
-
data[:saml] = saml if saml
|
284
|
-
data[:oidc] = oidc if oidc
|
285
|
-
result = @client.patch(path % replacements, data: data)
|
286
|
-
NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result)
|
287
|
-
end
|
288
|
-
|
289
|
-
##
|
290
|
-
# Updates an endpoint configuration. If a module is not specified in the update,
|
291
|
-
# it will not be modified. However, each module configuration that is specified
|
292
|
-
# will completely replace the existing value. There is no way to delete an
|
293
|
-
# existing module via this API, instead use the delete module API.
|
294
|
-
# Throws an exception if API error.
|
295
|
-
#
|
296
|
-
# @param [string] id unique identifier of this endpoint configuration
|
297
|
-
# @param [string] 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
|
298
|
-
# @param [string] metadata arbitrary user-defined machine-readable data of this endpoint configuration. Optional, max 4096 bytes.
|
299
|
-
# @param [EndpointCircuitBreaker] circuit_breaker circuit breaker module configuration or ``null``
|
300
|
-
# @param [EndpointCompression] compression compression module configuration or ``null``
|
301
|
-
# @param [EndpointRequestHeaders] request_headers request headers module configuration or ``null``
|
302
|
-
# @param [EndpointResponseHeaders] response_headers response headers module configuration or ``null``
|
303
|
-
# @param [EndpointIPPolicyMutate] ip_policy ip policy module configuration or ``null``
|
304
|
-
# @param [EndpointMutualTLSMutate] mutual_tls mutual TLS module configuration or ``null``
|
305
|
-
# @param [EndpointTLSTermination] tls_termination TLS termination module configuration or ``null``
|
306
|
-
# @param [EndpointWebhookValidation] webhook_validation webhook validation module configuration or ``null``
|
307
|
-
# @param [EndpointOAuth] oauth oauth module configuration or ``null``
|
308
|
-
# @param [EndpointLoggingMutate] logging logging module configuration or ``null``
|
309
|
-
# @param [EndpointSAMLMutate] saml saml module configuration or ``null``
|
310
|
-
# @param [EndpointOIDC] oidc oidc module configuration or ``null``
|
311
|
-
# @return [NgrokAPI::Models::EndpointConfiguration] result from the API request
|
312
|
-
#
|
313
|
-
# https://ngrok.com/docs/api#api-endpoint-configurations-update
|
314
|
-
def update!(
|
315
|
-
id: "",
|
316
|
-
description: nil,
|
317
|
-
metadata: nil,
|
318
|
-
basic_auth: nil,
|
319
|
-
circuit_breaker: nil,
|
320
|
-
compression: nil,
|
321
|
-
request_headers: nil,
|
322
|
-
response_headers: nil,
|
323
|
-
ip_policy: nil,
|
324
|
-
mutual_tls: nil,
|
325
|
-
tls_termination: nil,
|
326
|
-
webhook_validation: nil,
|
327
|
-
oauth: nil,
|
328
|
-
logging: nil,
|
329
|
-
saml: nil,
|
330
|
-
oidc: nil,
|
331
|
-
backend: nil
|
332
|
-
)
|
333
|
-
path = '/endpoint_configurations/%{id}'
|
334
|
-
replacements = {
|
335
|
-
id: id,
|
336
|
-
}
|
337
|
-
data = {}
|
338
|
-
data[:description] = description if description
|
339
|
-
data[:metadata] = metadata if metadata
|
340
|
-
data[:circuit_breaker] = circuit_breaker if circuit_breaker
|
341
|
-
data[:compression] = compression if compression
|
342
|
-
data[:request_headers] = request_headers if request_headers
|
343
|
-
data[:response_headers] = response_headers if response_headers
|
344
|
-
data[:ip_policy] = ip_policy if ip_policy
|
345
|
-
data[:mutual_tls] = mutual_tls if mutual_tls
|
346
|
-
data[:tls_termination] = tls_termination if tls_termination
|
347
|
-
data[:webhook_validation] = webhook_validation if webhook_validation
|
348
|
-
data[:oauth] = oauth if oauth
|
349
|
-
data[:logging] = logging if logging
|
350
|
-
data[:saml] = saml if saml
|
351
|
-
data[:oidc] = oidc if oidc
|
352
|
-
result = @client.patch(path % replacements, data: data, danger: true)
|
353
|
-
NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result)
|
354
|
-
end
|
355
|
-
end
|
356
|
-
end
|
357
|
-
end
|
@@ -1,259 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module NgrokAPI
|
4
|
-
module Services
|
5
|
-
##
|
6
|
-
# https://ngrok.com/docs/api#api-event-streams
|
7
|
-
class EventStreamsClient
|
8
|
-
# The API path for the requests
|
9
|
-
PATH = '/event_streams'
|
10
|
-
# The List Property from the resulting API for list calls
|
11
|
-
LIST_PROPERTY = 'event_streams'
|
12
|
-
|
13
|
-
attr_reader :client
|
14
|
-
|
15
|
-
def initialize(client:)
|
16
|
-
@client = client
|
17
|
-
end
|
18
|
-
|
19
|
-
##
|
20
|
-
# Create a new Event Stream. It will not apply to anything until you associate it
|
21
|
-
# with one or more Endpoint Configs.
|
22
|
-
#
|
23
|
-
# @param [string] metadata Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.
|
24
|
-
# @param [string] description Human-readable description of the Event Stream. Optional, max 255 bytes.
|
25
|
-
# @param [List<string>] fields A list of protocol-specific fields you want to collect on each event.
|
26
|
-
# @param [string] event_type The protocol that determines which events will be collected. Supported values are ``tcp_connection_closed`` and ``http_request_complete``.
|
27
|
-
# @param [List<string>] 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.
|
28
|
-
# @param [float64] sampling_rate 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.
|
29
|
-
# @return [NgrokAPI::Models::EventStream] result from the API request
|
30
|
-
#
|
31
|
-
# https://ngrok.com/docs/api#api-event-streams-create
|
32
|
-
def create(
|
33
|
-
metadata: "",
|
34
|
-
description: "",
|
35
|
-
fields: [],
|
36
|
-
event_type: "",
|
37
|
-
destination_ids: [],
|
38
|
-
sampling_rate: 0
|
39
|
-
)
|
40
|
-
path = '/event_streams'
|
41
|
-
replacements = {
|
42
|
-
}
|
43
|
-
data = {}
|
44
|
-
data[:metadata] = metadata if metadata
|
45
|
-
data[:description] = description if description
|
46
|
-
data[:fields] = fields if fields
|
47
|
-
data[:event_type] = event_type if event_type
|
48
|
-
data[:destination_ids] = destination_ids if destination_ids
|
49
|
-
data[:sampling_rate] = sampling_rate if sampling_rate
|
50
|
-
result = @client.post(path % replacements, data: data)
|
51
|
-
NgrokAPI::Models::EventStream.new(client: self, result: result)
|
52
|
-
end
|
53
|
-
|
54
|
-
##
|
55
|
-
# Delete an Event Stream. Associated Event Destinations will be preserved.
|
56
|
-
#
|
57
|
-
# @param [string] id a resource identifier
|
58
|
-
# @return [NgrokAPI::Models::Empty] result from the API request
|
59
|
-
#
|
60
|
-
# https://ngrok.com/docs/api#api-event-streams-delete
|
61
|
-
def delete(
|
62
|
-
id: ""
|
63
|
-
)
|
64
|
-
path = '/event_streams/%{id}'
|
65
|
-
replacements = {
|
66
|
-
id: id,
|
67
|
-
}
|
68
|
-
@client.delete(path % replacements)
|
69
|
-
end
|
70
|
-
|
71
|
-
##
|
72
|
-
# Delete an Event Stream. Associated Event Destinations will be preserved.
|
73
|
-
# Throws an exception if API error.
|
74
|
-
#
|
75
|
-
# @param [string] id a resource identifier
|
76
|
-
# @return [NgrokAPI::Models::Empty] result from the API request
|
77
|
-
#
|
78
|
-
# https://ngrok.com/docs/api#api-event-streams-delete
|
79
|
-
def delete!(
|
80
|
-
id: ""
|
81
|
-
)
|
82
|
-
path = '/event_streams/%{id}'
|
83
|
-
replacements = {
|
84
|
-
id: id,
|
85
|
-
}
|
86
|
-
@client.delete(path % replacements, danger: true)
|
87
|
-
end
|
88
|
-
|
89
|
-
##
|
90
|
-
# Get detailed information about an Event Stream by ID.
|
91
|
-
#
|
92
|
-
# @param [string] id a resource identifier
|
93
|
-
# @return [NgrokAPI::Models::EventStream] result from the API request
|
94
|
-
#
|
95
|
-
# https://ngrok.com/docs/api#api-event-streams-get
|
96
|
-
def get(
|
97
|
-
id: ""
|
98
|
-
)
|
99
|
-
path = '/event_streams/%{id}'
|
100
|
-
replacements = {
|
101
|
-
id: id,
|
102
|
-
}
|
103
|
-
data = {}
|
104
|
-
result = @client.get(path % replacements, data: data)
|
105
|
-
NgrokAPI::Models::EventStream.new(client: self, result: result)
|
106
|
-
end
|
107
|
-
|
108
|
-
##
|
109
|
-
# Get detailed information about an Event Stream by ID.
|
110
|
-
# Throws an exception if API error.
|
111
|
-
#
|
112
|
-
# @param [string] id a resource identifier
|
113
|
-
# @return [NgrokAPI::Models::EventStream] result from the API request
|
114
|
-
#
|
115
|
-
# https://ngrok.com/docs/api#api-event-streams-get
|
116
|
-
def get!(
|
117
|
-
id: ""
|
118
|
-
)
|
119
|
-
path = '/event_streams/%{id}'
|
120
|
-
replacements = {
|
121
|
-
id: id,
|
122
|
-
}
|
123
|
-
data = {}
|
124
|
-
result = @client.get(path % replacements, data: data, danger: true)
|
125
|
-
NgrokAPI::Models::EventStream.new(client: self, result: result)
|
126
|
-
end
|
127
|
-
|
128
|
-
##
|
129
|
-
# List all Event Streams available on this account.
|
130
|
-
#
|
131
|
-
# @param [string] before_id
|
132
|
-
# @param [string] limit
|
133
|
-
# @param [string] url optional and mutually exclusive from before_id and limit
|
134
|
-
# @return [NgrokAPI::Models::Listable] result from the API request
|
135
|
-
#
|
136
|
-
# https://ngrok.com/docs/api#api-event-streams-list
|
137
|
-
def list(
|
138
|
-
before_id: nil,
|
139
|
-
limit: nil,
|
140
|
-
url: nil
|
141
|
-
)
|
142
|
-
result = @client.list(
|
143
|
-
before_id: before_id,
|
144
|
-
limit: limit,
|
145
|
-
url: url,
|
146
|
-
path: PATH
|
147
|
-
)
|
148
|
-
|
149
|
-
NgrokAPI::Models::Listable.new(
|
150
|
-
client: self,
|
151
|
-
result: result,
|
152
|
-
list_property: LIST_PROPERTY,
|
153
|
-
klass: NgrokAPI::Models::EventStream
|
154
|
-
)
|
155
|
-
end
|
156
|
-
|
157
|
-
##
|
158
|
-
# List all Event Streams available on this account.
|
159
|
-
# Throws an exception if API error.
|
160
|
-
#
|
161
|
-
# @param [string] before_id
|
162
|
-
# @param [string] limit
|
163
|
-
# @param [string] url optional and mutually exclusive from before_id and limit
|
164
|
-
# @return [NgrokAPI::Models::Listable] result from the API request
|
165
|
-
#
|
166
|
-
# https://ngrok.com/docs/api#api-event-streams-list
|
167
|
-
def list!(
|
168
|
-
before_id: nil,
|
169
|
-
limit: nil,
|
170
|
-
url: nil
|
171
|
-
)
|
172
|
-
result = @client.list(
|
173
|
-
before_id: before_id,
|
174
|
-
limit: limit,
|
175
|
-
danger: true,
|
176
|
-
url: url,
|
177
|
-
path: PATH
|
178
|
-
)
|
179
|
-
|
180
|
-
NgrokAPI::Models::Listable.new(
|
181
|
-
client: self,
|
182
|
-
result: result,
|
183
|
-
list_property: LIST_PROPERTY,
|
184
|
-
klass: NgrokAPI::Models::EventStream,
|
185
|
-
danger: true
|
186
|
-
)
|
187
|
-
end
|
188
|
-
|
189
|
-
##
|
190
|
-
# Update attributes of an Event Stream by ID.
|
191
|
-
#
|
192
|
-
# @param [string] id Unique identifier for this Event Stream.
|
193
|
-
# @param [string] metadata Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.
|
194
|
-
# @param [string] description Human-readable description of the Event Stream. Optional, max 255 bytes.
|
195
|
-
# @param [List<string>] fields A list of protocol-specific fields you want to collect on each event.
|
196
|
-
# @param [List<string>] 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.
|
197
|
-
# @param [float64] sampling_rate 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.
|
198
|
-
# @return [NgrokAPI::Models::EventStream] result from the API request
|
199
|
-
#
|
200
|
-
# https://ngrok.com/docs/api#api-event-streams-update
|
201
|
-
def update(
|
202
|
-
id: "",
|
203
|
-
metadata: nil,
|
204
|
-
description: nil,
|
205
|
-
fields: nil,
|
206
|
-
destination_ids: nil,
|
207
|
-
sampling_rate: nil
|
208
|
-
)
|
209
|
-
path = '/event_streams/%{id}'
|
210
|
-
replacements = {
|
211
|
-
id: id,
|
212
|
-
}
|
213
|
-
data = {}
|
214
|
-
data[:metadata] = metadata if metadata
|
215
|
-
data[:description] = description if description
|
216
|
-
data[:fields] = fields if fields
|
217
|
-
data[:destination_ids] = destination_ids if destination_ids
|
218
|
-
data[:sampling_rate] = sampling_rate if sampling_rate
|
219
|
-
result = @client.patch(path % replacements, data: data)
|
220
|
-
NgrokAPI::Models::EventStream.new(client: self, result: result)
|
221
|
-
end
|
222
|
-
|
223
|
-
##
|
224
|
-
# Update attributes of an Event Stream by ID.
|
225
|
-
# Throws an exception if API error.
|
226
|
-
#
|
227
|
-
# @param [string] id Unique identifier for this Event Stream.
|
228
|
-
# @param [string] metadata Arbitrary user-defined machine-readable data of this Event Stream. Optional, max 4096 bytes.
|
229
|
-
# @param [string] description Human-readable description of the Event Stream. Optional, max 255 bytes.
|
230
|
-
# @param [List<string>] fields A list of protocol-specific fields you want to collect on each event.
|
231
|
-
# @param [List<string>] 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.
|
232
|
-
# @param [float64] sampling_rate 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.
|
233
|
-
# @return [NgrokAPI::Models::EventStream] result from the API request
|
234
|
-
#
|
235
|
-
# https://ngrok.com/docs/api#api-event-streams-update
|
236
|
-
def update!(
|
237
|
-
id: "",
|
238
|
-
metadata: nil,
|
239
|
-
description: nil,
|
240
|
-
fields: nil,
|
241
|
-
destination_ids: nil,
|
242
|
-
sampling_rate: nil
|
243
|
-
)
|
244
|
-
path = '/event_streams/%{id}'
|
245
|
-
replacements = {
|
246
|
-
id: id,
|
247
|
-
}
|
248
|
-
data = {}
|
249
|
-
data[:metadata] = metadata if metadata
|
250
|
-
data[:description] = description if description
|
251
|
-
data[:fields] = fields if fields
|
252
|
-
data[:destination_ids] = destination_ids if destination_ids
|
253
|
-
data[:sampling_rate] = sampling_rate if sampling_rate
|
254
|
-
result = @client.patch(path % replacements, data: data, danger: true)
|
255
|
-
NgrokAPI::Models::EventStream.new(client: self, result: result)
|
256
|
-
end
|
257
|
-
end
|
258
|
-
end
|
259
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
RSpec.describe NgrokAPI::Models::EndpointConfiguration do
|
4
|
-
before(:each) do
|
5
|
-
@client = class_double("EndpointConfigurationsClient")
|
6
|
-
@endpoint_configuration = NgrokAPI::Models::EndpointConfiguration.new(client: @client, result: endpoint_configuration_result)
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "#==" do
|
10
|
-
it "is equal if the results are the same" do
|
11
|
-
other = NgrokAPI::Models::EndpointConfiguration.new(client: @client, result: endpoint_configuration_result)
|
12
|
-
expect(@endpoint_configuration == other).to eq true
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "#to_s" do
|
17
|
-
it "stringifies as result.to_s" do
|
18
|
-
expect(@endpoint_configuration.to_s).to eq endpoint_configuration_result.to_s
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
describe "#delete" do
|
23
|
-
it "calls delete on the client" do
|
24
|
-
expect(@endpoint_configuration.client).to receive(:delete)
|
25
|
-
@endpoint_configuration.delete
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
describe "#update" do
|
30
|
-
it "calls update on the client" do
|
31
|
-
new_description = 'New description'
|
32
|
-
new_metadata = 'New metadata'
|
33
|
-
new_circuit_breaker = 'New circuit_breaker'
|
34
|
-
new_compression = 'New compression'
|
35
|
-
new_request_headers = 'New request_headers'
|
36
|
-
new_response_headers = 'New response_headers'
|
37
|
-
new_ip_policy = 'New ip_policy'
|
38
|
-
new_mutual_tls = 'New mutual_tls'
|
39
|
-
new_tls_termination = 'New tls_termination'
|
40
|
-
new_webhook_validation = 'New webhook_validation'
|
41
|
-
new_oauth = 'New oauth'
|
42
|
-
new_logging = 'New logging'
|
43
|
-
new_saml = 'New saml'
|
44
|
-
new_oidc = 'New oidc'
|
45
|
-
expect(@endpoint_configuration.client).to receive(:update)
|
46
|
-
@endpoint_configuration.update(
|
47
|
-
description: new_description,
|
48
|
-
metadata: new_metadata,
|
49
|
-
circuit_breaker: new_circuit_breaker,
|
50
|
-
compression: new_compression,
|
51
|
-
request_headers: new_request_headers,
|
52
|
-
response_headers: new_response_headers,
|
53
|
-
ip_policy: new_ip_policy,
|
54
|
-
mutual_tls: new_mutual_tls,
|
55
|
-
tls_termination: new_tls_termination,
|
56
|
-
webhook_validation: new_webhook_validation,
|
57
|
-
oauth: new_oauth,
|
58
|
-
logging: new_logging,
|
59
|
-
saml: new_saml,
|
60
|
-
oidc: new_oidc
|
61
|
-
)
|
62
|
-
expect(@endpoint_configuration.description).to eq new_description
|
63
|
-
expect(@endpoint_configuration.metadata).to eq new_metadata
|
64
|
-
expect(@endpoint_configuration.circuit_breaker).to eq new_circuit_breaker
|
65
|
-
expect(@endpoint_configuration.compression).to eq new_compression
|
66
|
-
expect(@endpoint_configuration.request_headers).to eq new_request_headers
|
67
|
-
expect(@endpoint_configuration.response_headers).to eq new_response_headers
|
68
|
-
expect(@endpoint_configuration.ip_policy).to eq new_ip_policy
|
69
|
-
expect(@endpoint_configuration.mutual_tls).to eq new_mutual_tls
|
70
|
-
expect(@endpoint_configuration.tls_termination).to eq new_tls_termination
|
71
|
-
expect(@endpoint_configuration.webhook_validation).to eq new_webhook_validation
|
72
|
-
expect(@endpoint_configuration.oauth).to eq new_oauth
|
73
|
-
expect(@endpoint_configuration.logging).to eq new_logging
|
74
|
-
expect(@endpoint_configuration.saml).to eq new_saml
|
75
|
-
expect(@endpoint_configuration.oidc).to eq new_oidc
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|