Script allowlist

Updated at:

By default, scripting is disabled in Elasticsearch Serverless. Calling scripts directly causes an error. To use a script, you must add it to the script allowlist by submitting a request in the Elasticsearch Serverless console. You must provide a script name (required) and the script content (required). A description is optional. Technical Support must then approve the request to enable the script.

For stability reasons, the script allowlist approval process is not available for specifications below 16 cores. If you need to use scripts on a smaller specification, upgrade the instance to 16 cores or higher first, and then submit the approval request from the console.

Procedure

  1. Log on to the Elasticsearch Serverless console and select the target region from the top menu bar.

  2. Click Application Management and then click the target application name to open the Basic information page.

  3. In the navigation pane, click Application Management > Service Quota and then click the Script Whitelist tab.

  4. Click Add Whitelist, and enter a Script Name and Description. Click Edit to write the script content. After you confirm that the configuration is correct, click Confirm and then Submit Modification. After you submit the request, it enters a manual approval process and is reviewed by Technical Support. The changes take effect only after the request is approved.

    Important

    The script content must be identical to the script you intend to call, including all spaces and blank lines. Any discrepancy causes a runtime error.

    You cannot submit another request to modify the script allowlist while a previous one is pending approval. You can check the approval status on the Application History tab.