TLS Edge Traffic Policy Module
Replace TLS Edge Traffic Policy Module
Request
PUT /edges/tls/{id}/traffic_policy
Example Request
curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"enabled":true,"value":"{\n\t\"inbound\": [\n\t\t{\n\t\t\t\"name\": \"AllowTLS1.3\",\n\t\t\t\"expressions\":[\"conn.tls.version.contains('1.3')\"],\n\t\t\t\"actions\":[\n\t\t\t\t{\n\t\t\t\t\t\"type\":\"log\",\n\t\t\t\t\t\"config\":{\n\t\t\t\t\t\t\"metadata\":{\n\t\t\t\t\t\t\t\"message\":\"Invalid TLS Version\",\n\t\t\t\t\t\t\t\"edgeId\": \"edgtls_2k5okwZ6bY5Y0fdpt0fXOBv0ugH\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\":\"deny\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n}"}' \
https://api.ngrok.com/edges/tls/edgtls_2k5okwZ6bY5Y0fdpt0fXOBv0ugH/traffic_policy
Parameters
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
value | string | the traffic policy that should be applied to the traffic on your endpoint. |
Response
Returns a 200 response on success
Example Response
{
"enabled": true,
"value": "{\"inbound\":[{\"expressions\":[\"conn.tls.version.contains('1.3')\"],\"name\":\"AllowTLS1.3\",\"actions\":[{\"type\":\"log\",\"config\":{\"metadata\":{\"message\":\"Invalid TLS Version\",\"edgeId\":\"edgtls_2k5okwZ6bY5Y0fdpt0fXOBv0ugH\"}}},{\"type\":\"deny\"}]}]}"
}
Fields
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
value | string | the traffic policy that should be applied to the traffic on your endpoint. |
Get TLS Edge Traffic Policy Module
Request
GET /edges/tls/{id}/traffic_policy
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tls/edgtls_2k5okwZ6bY5Y0fdpt0fXOBv0ugH/traffic_policy
Response
Returns a 200 response on success
Example Response
{
"enabled": true,
"value": "{\"inbound\":[{\"expressions\":[\"conn.tls.version.contains('1.3')\"],\"name\":\"AllowTLS1.3\",\"actions\":[{\"type\":\"log\",\"config\":{\"metadata\":{\"message\":\"Invalid TLS Version\",\"edgeId\":\"edgtls_2k5okwZ6bY5Y0fdpt0fXOBv0ugH\"}}},{\"type\":\"deny\"}]}]}"
}
Fields
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
value | string | the traffic policy that should be applied to the traffic on your endpoint. |
Delete TLS Edge Traffic Policy Module
Request
DELETE /edges/tls/{id}/traffic_policy
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tls/edgtls_2k5okwZ6bY5Y0fdpt0fXOBv0ugH/traffic_policy
Response
Returns a 204 response with no body on success