You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**eventKeyJmespath**|`''`| JMESPath expression to extract the idempotency key from the event record using [built-in functions](./jmespath.md#built-in-jmespath-functions){target="_blank"} |
575
575
|**payloadValidationJmespath**|`''`| JMESPath expression to validate that the specified fields haven't changed across requests for the same idempotency key _e.g., payload tampering._|
576
+
|**jmesPathOptions**|`undefined`| Custom JMESPath functions to use when parsing the JMESPath expressions. See [Custom JMESPath Functions](idempotency.md#custom-jmespath-functions)|
576
577
|**throwOnNoIdempotencyKey**|`false`| Throw an error if no idempotency key was found in the request |
577
578
|**expiresAfterSeconds**| 3600 | The number of seconds to wait before a record is expired, allowing a new transaction with the same idempotency key |
578
579
|**useLocalCache**|`false`| Whether to cache idempotency results in-memory to save on persistence storage latency and costs |
@@ -657,6 +658,16 @@ Without payload validation, we would have returned the same result as we did for
657
658
658
659
By using **`payloadValidationJmesPath="amount"`**, we prevent this potentially confusing behavior and instead throw an error.
659
660
661
+
### Custom JMESPath Functions
662
+
663
+
You can provide custom JMESPath functions for evaluating JMESPath expressions by passing them through the **`jmesPathOptions`** parameter. In this example, we use a custom function, `my_fancy_function`, to parse the payload as a JSON object instead of a string.
0 commit comments