|
| 1 | +/* |
| 2 | + * Licensed to Elasticsearch B.V. under one or more contributor |
| 3 | + * license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright |
| 5 | + * ownership. Elasticsearch B.V. licenses this file to you under |
| 6 | + * the Apache License, Version 2.0 (the "License"); you may |
| 7 | + * not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +import { RequestBase } from '@_types/Base' |
| 21 | +import { ExpandWildcards, IndexName } from '@_types/common' |
| 22 | +import { Duration } from '@_types/Time' |
| 23 | +import {IndexSettingBlocks, IndexSettings} from "../_types/IndexSettings"; |
| 24 | + |
| 25 | +/** |
| 26 | + * Remove an index block. |
| 27 | + * |
| 28 | + * Remove an index block from an index. |
| 29 | + * Index blocks limit the operations allowed on an index by blocking specific operation types. |
| 30 | + * @rest_spec_name indices.remove_block |
| 31 | + * @availability stack since=9.1.0 stability=stable |
| 32 | + * @availability serverless stability=stable visibility=public |
| 33 | + * @doc_id index-block-remove |
| 34 | + */ |
| 35 | +export interface Request extends RequestBase { |
| 36 | + urls: [ |
| 37 | + { |
| 38 | + path: '/{index}/_block/{block}' |
| 39 | + methods: ['DELETE'] |
| 40 | + } |
| 41 | + ] |
| 42 | + path_parts: { |
| 43 | + /** |
| 44 | + * A comma-separated list or wildcard expression of index names used to limit the request. |
| 45 | + * By default, you must explicitly name the indices you are removing blocks from. |
| 46 | + * To allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`. |
| 47 | + * You can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API. |
| 48 | + */ |
| 49 | + index: IndexName |
| 50 | + /** |
| 51 | + * The block type to remove from the index. |
| 52 | + */ |
| 53 | + block: keyof IndexSettingBlocks |
| 54 | + } |
| 55 | + query_parameters: { |
| 56 | + /** |
| 57 | + * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. |
| 58 | + * This behavior applies even if the request targets other open indices. |
| 59 | + * For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. |
| 60 | + * @server_default true |
| 61 | + */ |
| 62 | + allow_no_indices?: boolean // default: true |
| 63 | + /** |
| 64 | + * The type of index that wildcard patterns can match. |
| 65 | + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. |
| 66 | + * It supports comma-separated values, such as `open,hidden`. |
| 67 | + * @server_default open |
| 68 | + */ |
| 69 | + expand_wildcards?: ExpandWildcards // default: open |
| 70 | + /** |
| 71 | + * If `false`, the request returns an error if it targets a missing or closed index. |
| 72 | + * @server_default false |
| 73 | + */ |
| 74 | + ignore_unavailable?: boolean // default: false |
| 75 | + /** |
| 76 | + * The period to wait for the master node. |
| 77 | + * If the master node is not available before the timeout expires, the request fails and returns an error. |
| 78 | + * It can also be set to `-1` to indicate that the request should never timeout. |
| 79 | + * @server_default 30s |
| 80 | + */ |
| 81 | + master_timeout?: Duration // default: 30s |
| 82 | + /** |
| 83 | + * The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. |
| 84 | + * If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. |
| 85 | + * It can also be set to `-1` to indicate that the request should never timeout. |
| 86 | + * @server_default 30s |
| 87 | + */ |
| 88 | + timeout?: Duration // default: 30s |
| 89 | + } |
| 90 | +} |
0 commit comments