TLS Edge IP Restriction Module
Replace TLS Edge IP Restriction Module
Request
PUT /edges/tls/{id}/ip_restriction
Example Request
curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"enabled":true,"ip_policy_ids":["ipp_2TMGJo693AyKky2HOTWLhLT8TFQ","ipp_2TMGJo83W4EW93unJ4Rhv0Lvc3z"]}' \
https://api.ngrok.com/edges/tls/edgtls_2TMGJoe82PQgEU6hfVj6GZQxHJ5/ip_restriction
Parameters
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
ip_policy_ids | List<string> | list of all IP policies that will be used to check if a source IP is allowed access to the endpoint |
Response
Returns a 200 response on success
Example Response
{
"enabled": true,
"ip_policies": [
{
"id": "ipp_2TMGJo693AyKky2HOTWLhLT8TFQ",
"uri": "https://api.ngrok.com/ip_policies/ipp_2TMGJo693AyKky2HOTWLhLT8TFQ"
},
{
"id": "ipp_2TMGJo83W4EW93unJ4Rhv0Lvc3z",
"uri": "https://api.ngrok.com/ip_policies/ipp_2TMGJo83W4EW93unJ4Rhv0Lvc3z"
}
]
}
Fields
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
ip_policies | Ref | list of all IP policies that will be used to check if a source IP is allowed access to the endpoint |
Ref fields
id | string | a resource identifier |
uri | string | a uri for locating a resource |
Get TLS Edge IP Restriction Module
Request
GET /edges/tls/{id}/ip_restriction
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tls/edgtls_2TMGJoe82PQgEU6hfVj6GZQxHJ5/ip_restriction
Response
Returns a 200 response on success
Example Response
{
"enabled": true,
"ip_policies": [
{
"id": "ipp_2TMGJo693AyKky2HOTWLhLT8TFQ",
"uri": "https://api.ngrok.com/ip_policies/ipp_2TMGJo693AyKky2HOTWLhLT8TFQ"
},
{
"id": "ipp_2TMGJo83W4EW93unJ4Rhv0Lvc3z",
"uri": "https://api.ngrok.com/ip_policies/ipp_2TMGJo83W4EW93unJ4Rhv0Lvc3z"
}
]
}
Fields
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
ip_policies | Ref | list of all IP policies that will be used to check if a source IP is allowed access to the endpoint |
Ref fields
id | string | a resource identifier |
uri | string | a uri for locating a resource |
Delete TLS Edge IP Restriction Module
Request
DELETE /edges/tls/{id}/ip_restriction
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tls/edgtls_2TMGJoe82PQgEU6hfVj6GZQxHJ5/ip_restriction
Response
Returns a 204 response with no body on success