Files
elasticsearch-js/docs/reference-indices-add_block.asciidoc
2024-12-05 14:46:46 -06:00

71 lines
4.2 KiB
Plaintext

[[reference-indices-add_block]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
=== client.indices.addBlock
Add an index block. Limits the operations allowed on an index by blocking specific operation types.
{ref}/index-modules-blocks.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(IndicesAddBlockRequest, options?): Promise<IndicesAddBlockResponse>
----
[discrete]
===== `IndicesAddBlockRequest`
[source,ts]
----
interface IndicesAddBlockRequest extends <<shared-type-request-base, RequestBase>> {
index: <<shared-type-index-name, IndexName>>
block: IndicesAddBlockIndicesBlockOptions
allow_no_indices?: boolean
expand_wildcards?: <<shared-type-expand-wildcards, ExpandWildcards>>
ignore_unavailable?: boolean
master_timeout?: <<shared-type-duration, Duration>>
timeout?: <<shared-type-duration, Duration>>
}
----
[discrete]
===== `IndicesAddBlockResponse`
[source,ts]
----
interface IndicesAddBlockResponse {
acknowledged: boolean
shards_acknowledged: boolean
indices: IndicesAddBlockIndicesBlockStatus[]
}
----