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.
-
#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, result: result) end |
#delete(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty
Delete an HTTPS Edge Route by ID
216 217 218 219 220 221 222 223 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 216 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.
234 235 236 237 238 239 240 241 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 234 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
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 72 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, result: result) end |
#get!(edge_id: "", id: "") ⇒ NgrokAPI::Models::HTTPSEdgeRoute
Get an HTTPS Edge Route by ID Throws an exception if API error.
92 93 94 95 96 97 98 99 100 101 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 92 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, result: 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.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 129 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, result: 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.
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 |
# File 'lib/ngrokapi/services/edges_https_routes_client.rb', line 182 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, result: result) end |