Exclude index patterns

is it possible to apply exclude index patterns to an index permission?
For example

 "index_permissions": [
        {
            "index_patterns": [
                "*",
                "~documents*"
            ],
            "fls": [],
            "masked_fields": [],
            "allowed_actions": [
                "read"
            ]
        }
    ]

I tried this but it didn’t work