Updating index.mapping.depth.limit for index template

Hello,

We are attempting to set the index.mapping.depth.limit to 3 for a new index template as we are seeing dynamically created objects that keep adding new fields (4,000+). Is there a way to set the depth limit in the composable index template, or do we have to do it through the API?

We've tried both methods and cannot get them to work, possibly a syntax issue with the API and/or the composable index settings. This is a short-term solution for a data ingestion we are experiencing, but trying to handle it on our end in the short-term.

Does anyone have any examples? Here's what we've tried:

PUT _template/my_index_template
{
  "index_patterns": [ "index_pattern*" ],
  "mappings": {
    "index.mapping.depth.limit": "3"
  }
}

This gives us an error "Root mapping definition has unsupported parameters: [index.mapping.depth.limit : 3]".

Similarly in the composable index, the preview shows a 400 error, so this isn't working there either.

Thanks in advance!