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, user_agent_filter: nil, policy: nil, traffic_policy: 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, user_agent_filter: nil, policy: nil, traffic_policy: 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, user_agent_filter: nil, policy: nil, traffic_policy: 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, user_agent_filter: nil, policy: nil, traffic_policy: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Updates an HTTPS Edge Route by ID.
Constructor Details
#initialize(client:) ⇒ EdgesHTTPSRoutesClient
Returns a new instance of EdgesHTTPSRoutesClient.
15 16 17 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 15 def initialize(client:) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
13 14 15 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 13 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, user_agent_filter: nil, policy: nil, traffic_policy: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Create an HTTPS Edge Route
43 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 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 43 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, user_agent_filter: nil, policy: nil, traffic_policy: 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 data[:user_agent_filter] = user_agent_filter if user_agent_filter data[:traffic_policy] = traffic_policy if traffic_policy 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, user_agent_filter: nil, policy: nil, traffic_policy: nil) ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Create an HTTPS Edge Route Throws an exception if API error.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 95 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, user_agent_filter: nil, policy: nil, traffic_policy: 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 data[:user_agent_filter] = user_agent_filter if user_agent_filter data[:traffic_policy] = traffic_policy if traffic_policy 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
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) end |
#delete!(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty
Delete an HTTPS Edge Route by ID Throws an exception if API error.
300 301 302 303 304 305 306 307 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 300 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
130 131 132 133 134 135 136 137 138 139 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 130 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.
150 151 152 153 154 155 156 157 158 159 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 150 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, user_agent_filter: nil, policy: nil, traffic_policy: 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.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 189 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, user_agent_filter: nil, policy: nil, traffic_policy: 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 data[:user_agent_filter] = user_agent_filter if user_agent_filter data[:traffic_policy] = traffic_policy if traffic_policy 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, user_agent_filter: nil, policy: nil, traffic_policy: 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.
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 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 246 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, user_agent_filter: nil, policy: nil, traffic_policy: 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 data[:user_agent_filter] = user_agent_filter if user_agent_filter data[:traffic_policy] = traffic_policy if traffic_policy result = @client.patch(path % replacements, data: data, danger: true) NgrokAPI::Models::HTTPSEdgeRoute.new(client: self, attrs: result) end |