|
| 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 { Duration } from '@_types/Time' |
| 22 | + |
| 23 | +/** |
| 24 | + * Set upgrade_mode for transform indices. |
| 25 | + * Sets a cluster wide upgrade_mode setting that prepares transform |
| 26 | + * indices for an upgrade. |
| 27 | + * When upgrading your cluster, in some circumstances you must restart your |
| 28 | + * nodes and reindex your transform indices. In those circumstances, |
| 29 | + * there must be no transforms running. You can close the transforms, |
| 30 | + * do the upgrade, then open all the transforms again. Alternatively, |
| 31 | + * you can use this API to temporarily halt tasks associated with the transforms |
| 32 | + * and prevent new transforms from opening. You can also use this API |
| 33 | + * during upgrades that do not require you to reindex your transform |
| 34 | + * indices, though stopping transforms is not a requirement in that case. |
| 35 | + * You can see the current value for the upgrade_mode setting by using the get |
| 36 | + * transform info API. |
| 37 | + * @rest_spec_name transform.set_upgrade_mode |
| 38 | + * @availability stack since=8.18.0 stability=stable |
| 39 | + * @availability serverless stability=stable visibility=private |
| 40 | + * @cluster_privileges manage_transform |
| 41 | + * @doc_id transform-set-upgrade-mode |
| 42 | + */ |
| 43 | +export interface Request extends RequestBase { |
| 44 | + urls: [ |
| 45 | + { |
| 46 | + path: '/_transform/set_upgrade_mode' |
| 47 | + methods: ['POST'] |
| 48 | + } |
| 49 | + ] |
| 50 | + query_parameters: { |
| 51 | + /** |
| 52 | + * When `true`, it enables `upgrade_mode` which temporarily halts all |
| 53 | + * transform tasks and prohibits new transform tasks from |
| 54 | + * starting. |
| 55 | + * @server_default false |
| 56 | + */ |
| 57 | + enabled?: boolean |
| 58 | + /** |
| 59 | + * The time to wait for the request to be completed. |
| 60 | + * @server_default 30s |
| 61 | + */ |
| 62 | + timeout?: Duration |
| 63 | + } |
| 64 | +} |
0 commit comments