Class: NgrokAPI::Services::EndpointConfigurationsClient
- Inherits:
-
Object
- Object
- NgrokAPI::Services::EndpointConfigurationsClient
- Defined in:
- lib/ngrokapi/services/endpoint_configurations_client.rb
Overview
A client for interacting with the endpoint_configuration API
Constant Summary collapse
- LIST_PROPERTY =
The List Property from the resulting API for list calls
'endpoint_configurations'- PATH =
The API path for endpoint configurations
'/endpoint_configurations'
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#create(description: '', metadata: '', type: '', circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Create a new endpoint configuration.
-
#delete(id: nil) ⇒ nil
Delete an endpoint configuration.
-
#delete!(id: nil) ⇒ nil
Delete an endpoint configuration.
-
#get(id: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Returns detailed information about an endpoint configuration by ID.
-
#get!(id: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Returns detailed information about an endpoint configuration by ID.
-
#initialize(client:) ⇒ EndpointConfigurationsClient
constructor
A new instance of EndpointConfigurationsClient.
-
#list(before_id: nil, limit: nil, url: nil) ⇒ NgrokAPI::Models::Listable
Returns a list of all endpoint configurations on this account.
-
#update(id: nil, description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Updates an endpoint configuration.
-
#update!(id: nil, description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Updates an endpoint configuration.
Constructor Details
#initialize(client:) ⇒ EndpointConfigurationsClient
Returns a new instance of EndpointConfigurationsClient.
17 18 19 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 17 def initialize(client:) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
15 16 17 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 15 def client @client end |
Instance Method Details
#create(description: '', metadata: '', type: '', circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Create a new endpoint configuration
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 44 def create( description: '', metadata: '', type: '', circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil ) data = { type: type, description: description, 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, } result = @client.post(PATH, data: data) NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result) end |
#delete(id: nil) ⇒ nil
Delete an endpoint configuration. This operation will fail if the endpoint configuration is still referenced by any reserved domain or reserved address.
92 93 94 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 92 def delete(id: nil) @client.delete("#{PATH}/#{id}") end |
#delete!(id: nil) ⇒ nil
Delete an endpoint configuration. Throw an exception if 404. This operation will fail if the endpoint configuration is still referenced by any reserved domain or reserved address.
105 106 107 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 105 def delete!(id: nil) @client.delete("#{PATH}/#{id}", danger: true) end |
#get(id: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Returns detailed information about an endpoint configuration by ID.
116 117 118 119 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 116 def get(id: nil) result = @client.get("#{PATH}/#{id}") NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result) end |
#get!(id: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Returns detailed information about an endpoint configuration by ID. Throw an execption if 404.
128 129 130 131 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 128 def get!(id: nil) result = @client.get("#{PATH}/#{id}", danger: true) NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result) end |
#list(before_id: nil, limit: nil, url: nil) ⇒ NgrokAPI::Models::Listable
Returns a list of all endpoint configurations on this account.
142 143 144 145 146 147 148 149 150 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 142 def list(before_id: nil, limit: nil, url: nil) result = @client.list(before_id: before_id, limit: limit, url: url, path: PATH) NgrokAPI::Models::Listable.new( client: self, result: result, list_property: LIST_PROPERTY, klass: NgrokAPI::Models::EndpointConfiguration ) end |
#update(id: nil, description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::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.
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 177 def update( id: nil, description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil ) data = build_data( description: description, 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 ) result = @client.patch("#{PATH}/#{id}", data: data) NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result) end |
#update!(id: nil, description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::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. Throw an exception if 404.
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/ngrokapi/services/endpoint_configurations_client.rb', line 238 def update!( id: nil, description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil ) data = build_data( description: description, 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 ) result = @client.patch("#{PATH}/#{id}", danger: true, data: data) NgrokAPI::Models::EndpointConfiguration.new(client: self, result: result) end |