Class: NgrokAPI::Services::EdgesHTTPSRoutesClient
- Inherits:
-
Object
- Object
- NgrokAPI::Services::EdgesHTTPSRoutesClient
- Defined in:
- lib/ngrokapi/services/edges_https_routes_client.rb
Overview
Constant Summary collapse
- PATH =
The API path for the requests
'/edges/https/%{edge_id}/routes'
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#create(edge_id: "", match_type:, match:, description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Create an HTTPS Edge Route.
-
#create!(edge_id: "", match_type:, match:, description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Create an HTTPS Edge Route Throws an exception if API error.
-
#delete(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty
Delete an HTTPS Edge Route by ID.
-
#delete!(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty
Delete an HTTPS Edge Route by ID Throws an exception if API error.
-
#get(edge_id: "", id: "") ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Get an HTTPS Edge Route by ID.
-
#get!(edge_id: "", id: "") ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Get an HTTPS Edge Route by ID Throws an exception if API error.
-
#initialize(client:) ⇒ EdgesHTTPSRoutesClient
constructor
A new instance of EdgesHTTPSRoutesClient.
-
#update(edge_id: "", id: "", match_type: "", match: "", description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Updates an HTTPS Edge Route by ID.
-
#update!(edge_id: "", id: "", match_type: "", match: "", description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Updates an HTTPS Edge Route by ID.
Constructor Details
#initialize(client:) ⇒ EdgesHTTPSRoutesClient
Returns a new instance of EdgesHTTPSRoutesClient.
13 14 15 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 13 def initialize(client:) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 11 def client @client end |
Instance Method Details
#create(edge_id: "", match_type:, match:, description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Create an HTTPS Edge Route
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 39 def create(edge_id: "", match_type:, match:, description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) path = '/edges/https/%{edge_id}/routes' replacements = { edge_id: edge_id, } data = {} data[:match_type] = match_type if match_type data[:match] = match if match data[:description] = description if description data[:metadata] = if data[:backend] = backend if backend data[:ip_restriction] = ip_restriction if ip_restriction data[:circuit_breaker] = circuit_breaker if circuit_breaker data[:compression] = compression if compression data[:request_headers] = request_headers if request_headers data[:response_headers] = response_headers if response_headers data[:webhook_verification] = webhook_verification if webhook_verification data[:oauth] = oauth if oauth data[:saml] = saml if saml data[:oidc] = oidc if oidc data[:websocket_tcp_converter] = websocket_tcp_converter if websocket_tcp_converter result = @client.post(path % replacements, data: data) NgrokAPI::Models::HTTPSEdgeRoute.new(client: self, attrs: result) end |
#create!(edge_id: "", match_type:, match:, description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Create an HTTPS Edge Route Throws an exception if API error.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 87 def create!(edge_id: "", match_type:, match:, description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) path = '/edges/https/%{edge_id}/routes' replacements = { edge_id: edge_id, } data = {} data[:match_type] = match_type if match_type data[:match] = match if match data[:description] = description if description data[:metadata] = if data[:backend] = backend if backend data[:ip_restriction] = ip_restriction if ip_restriction data[:circuit_breaker] = circuit_breaker if circuit_breaker data[:compression] = compression if compression data[:request_headers] = request_headers if request_headers data[:response_headers] = response_headers if response_headers data[:webhook_verification] = webhook_verification if webhook_verification data[:oauth] = oauth if oauth data[:saml] = saml if saml data[:oidc] = oidc if oidc data[:websocket_tcp_converter] = websocket_tcp_converter if websocket_tcp_converter result = @client.post(path % replacements, data: data, danger: true) NgrokAPI::Models::HTTPSEdgeRoute.new(client: self, attrs: result) end |
#delete(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty
Delete an HTTPS Edge Route by ID
264 265 266 267 268 269 270 271 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 264 def delete(edge_id: "", id: "") path = '/edges/https/%{edge_id}/routes/%{id}' replacements = { edge_id: edge_id, id: id, } @client.delete(path % replacements) end |
#delete!(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty
Delete an HTTPS Edge Route by ID Throws an exception if API error.
282 283 284 285 286 287 288 289 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 282 def delete!(edge_id: "", id: "") path = '/edges/https/%{edge_id}/routes/%{id}' replacements = { edge_id: edge_id, id: id, } @client.delete(path % replacements, danger: true) end |
#get(edge_id: "", id: "") ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Get an HTTPS Edge Route by ID
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 120 def get(edge_id: "", id: "") path = '/edges/https/%{edge_id}/routes/%{id}' replacements = { edge_id: edge_id, id: id, } data = {} result = @client.get(path % replacements, data: data) NgrokAPI::Models::HTTPSEdgeRoute.new(client: self, attrs: result) end |
#get!(edge_id: "", id: "") ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Get an HTTPS Edge Route by ID Throws an exception if API error.
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 140 def get!(edge_id: "", id: "") path = '/edges/https/%{edge_id}/routes/%{id}' replacements = { edge_id: edge_id, id: id, } data = {} result = @client.get(path % replacements, data: data, danger: true) NgrokAPI::Models::HTTPSEdgeRoute.new(client: self, attrs: result) end |
#update(edge_id: "", id: "", match_type: "", match: "", description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Updates an HTTPS Edge Route by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.
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 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 177 def update(edge_id: "", id: "", match_type: "", match: "", description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) path = '/edges/https/%{edge_id}/routes/%{id}' replacements = { edge_id: edge_id, id: id, } data = {} data[:match_type] = match_type if match_type data[:match] = match if match data[:description] = description if description data[:metadata] = if data[:backend] = backend if backend data[:ip_restriction] = ip_restriction if ip_restriction data[:circuit_breaker] = circuit_breaker if circuit_breaker data[:compression] = compression if compression data[:request_headers] = request_headers if request_headers data[:response_headers] = response_headers if response_headers data[:webhook_verification] = webhook_verification if webhook_verification data[:oauth] = oauth if oauth data[:saml] = saml if saml data[:oidc] = oidc if oidc data[:websocket_tcp_converter] = websocket_tcp_converter if websocket_tcp_converter result = @client.patch(path % replacements, data: data) NgrokAPI::Models::HTTPSEdgeRoute.new(client: self, attrs: result) end |
#update!(edge_id: "", id: "", match_type: "", match: "", description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Updates an HTTPS Edge Route by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API. Throws an exception if API error.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 230 def update!(edge_id: "", id: "", match_type: "", match: "", description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) path = '/edges/https/%{edge_id}/routes/%{id}' replacements = { edge_id: edge_id, id: id, } data = {} data[:match_type] = match_type if match_type data[:match] = match if match data[:description] = description if description data[:metadata] = if data[:backend] = backend if backend data[:ip_restriction] = ip_restriction if ip_restriction data[:circuit_breaker] = circuit_breaker if circuit_breaker data[:compression] = compression if compression data[:request_headers] = request_headers if request_headers data[:response_headers] = response_headers if response_headers data[:webhook_verification] = webhook_verification if webhook_verification data[:oauth] = oauth if oauth data[:saml] = saml if saml data[:oidc] = oidc if oidc data[:websocket_tcp_converter] = websocket_tcp_converter if websocket_tcp_converter result = @client.patch(path % replacements, data: data, danger: true) NgrokAPI::Models::HTTPSEdgeRoute.new(client: self, attrs: result) end |