|
| 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 { Duration } from '@_types/Time' |
| 21 | + |
| 22 | +/** |
| 23 | + * Data stream failure store contains the configuration of the failure store for a given data stream. |
| 24 | + */ |
| 25 | +export class DataStreamFailureStore { |
| 26 | + /** |
| 27 | + * If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store |
| 28 | + * that's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will |
| 29 | + * not remove any existing data from the failure store. |
| 30 | + * @server_default true |
| 31 | + */ |
| 32 | + enabled?: boolean |
| 33 | + /** |
| 34 | + * If defined, it specifies the lifecycle configuration for the failure store of this data stream. |
| 35 | + */ |
| 36 | + lifecycle?: FailureStoreLifecycle |
| 37 | +} |
| 38 | + |
| 39 | +/** |
| 40 | + * The failure store lifecycle configures the data stream lifecycle configuration for failure indices. |
| 41 | + */ |
| 42 | +export class FailureStoreLifecycle { |
| 43 | + /** |
| 44 | + * If defined, every document added to this data stream will be stored at least for this time frame. |
| 45 | + * Any time after this duration the document could be deleted. |
| 46 | + * When empty, every document in this data stream will be stored indefinitely. |
| 47 | + */ |
| 48 | + data_retention?: Duration |
| 49 | + /** |
| 50 | + * If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle |
| 51 | + * that's disabled (enabled: `false`) will have no effect on the data stream. |
| 52 | + * @server_default true |
| 53 | + */ |
| 54 | + enabled?: boolean |
| 55 | +} |
0 commit comments