Add an index block
Added in 7.9.0
Limits the operations allowed on an index by blocking specific operation types.
Query parameters
-
allow_no_indices
boolean Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes
_all
string or when no indices have been specified) -
expand_wildcards
string | array[string] Whether to expand wildcard expression to concrete indices that are open, closed or both.
-
master_timeout
string Specify timeout for connection to master
-
timeout
string Explicit operation timeout
PUT
/{index}/_block/{block}
curl \
--request PUT http://api.example.com/{index}/_block/{block} \
--header "Authorization: $API_KEY"
Response examples (200)
A successful response for adding an index block to an index.
{
"acknowledged" : true,
"shards_acknowledged" : true,
"indices" : [ {
"name" : "my-index-000001",
"blocked" : true
} ]
}