Add an index block Added in 7.9.0
Limits the operations allowed on an index by blocking specific operation types.
Path parameters
-
A comma separated list of indices to add a block to
-
The block to add (one of read, write, read_only or metadata)
Values are
metadata
,read
,read_only
, orwrite
.
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 \
-X PUT http://api.example.com/{index}/_block/{block}
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
} ]
}