-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelasticsearchTransform.ts
More file actions
373 lines (365 loc) · 16.6 KB
/
Copy pathelasticsearchTransform.ts
File metadata and controls
373 lines (365 loc) · 16.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
export class ElasticsearchTransform extends pulumi.CustomResource {
/**
* Get an existing ElasticsearchTransform resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ElasticsearchTransformState, opts?: pulumi.CustomResourceOptions): ElasticsearchTransform {
return new ElasticsearchTransform(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'elasticstack:index/elasticsearchTransform:ElasticsearchTransform';
/**
* Returns true if the given object is an instance of ElasticsearchTransform. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is ElasticsearchTransform {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ElasticsearchTransform.__pulumiType;
}
/**
* Specifies whether the transform checkpoint ranges should be optimized for performance.
*/
declare public readonly alignCheckpoints: pulumi.Output<boolean | undefined>;
/**
* Defines if dates in the output should be written as ISO formatted string (default) or as millis since epoch.
*/
declare public readonly datesAsEpochMillis: pulumi.Output<boolean | undefined>;
/**
* Specifies whether the transform should deduce the destination index mappings from the transform config.
*/
declare public readonly deduceMappings: pulumi.Output<boolean | undefined>;
/**
* When true, deferrable validations are not run upon creation, but rather when the transform is started. This behavior may
* be desired if the source index does not exist until after the transform is created. Default is `false`
*/
declare public readonly deferValidation: pulumi.Output<boolean | undefined>;
/**
* Free text description of the transform.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* The destination for the transform.
*/
declare public readonly destination: pulumi.Output<outputs.ElasticsearchTransformDestination>;
/**
* Specifies a limit on the number of input documents per second. Default (unset) value disables throttling.
*/
declare public readonly docsPerSecond: pulumi.Output<number | undefined>;
/**
* Controls whether the transform should be started or stopped. Default is `false` (stopped).
*/
declare public readonly enabled: pulumi.Output<boolean | undefined>;
/**
* The interval between checks for changes in the source indices when the transform is running continuously. Defaults to
* `1m`.
*/
declare public readonly frequency: pulumi.Output<string | undefined>;
/**
* The latest method transforms the data by finding the latest document for each unique key. JSON definition expected.
* Either 'pivot' or 'latest' must be present.
*/
declare public readonly latest: pulumi.Output<string | undefined>;
/**
* Defines the initial page size to use for the composite aggregation for each checkpoint. Default is 500.
*/
declare public readonly maxPageSearchSize: pulumi.Output<number | undefined>;
/**
* Defines optional transform metadata.
*/
declare public readonly metadata: pulumi.Output<string | undefined>;
/**
* Name of the transform you wish to create.
*/
declare public readonly name: pulumi.Output<string>;
/**
* Defines the number of retries on a recoverable failure before the transform task is marked as failed. The default value
* is the cluster-level setting num_transform_failure_retries.
*/
declare public readonly numFailureRetries: pulumi.Output<number | undefined>;
/**
* The pivot method transforms the data by aggregating and grouping it. JSON definition expected. Either 'pivot' or
* 'latest' must be present.
*/
declare public readonly pivot: pulumi.Output<string | undefined>;
/**
* Defines a retention policy for the transform.
*/
declare public readonly retentionPolicy: pulumi.Output<outputs.ElasticsearchTransformRetentionPolicy | undefined>;
/**
* The source of the data for the transform.
*/
declare public readonly source: pulumi.Output<outputs.ElasticsearchTransformSource>;
/**
* Defines the properties transforms require to run continuously.
*/
declare public readonly sync: pulumi.Output<outputs.ElasticsearchTransformSync | undefined>;
/**
* Period to wait for a response from Elasticsearch when performing any management operation. If no response is received
* before the timeout expires, the operation fails and returns an error. Defaults to `30s`.
*/
declare public readonly timeout: pulumi.Output<string | undefined>;
/**
* In unattended mode, the transform retries indefinitely in case of an error which means the transform never fails.
*/
declare public readonly unattended: pulumi.Output<boolean | undefined>;
/**
* Create a ElasticsearchTransform resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ElasticsearchTransformArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: ElasticsearchTransformArgs | ElasticsearchTransformState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as ElasticsearchTransformState | undefined;
resourceInputs["alignCheckpoints"] = state?.alignCheckpoints;
resourceInputs["datesAsEpochMillis"] = state?.datesAsEpochMillis;
resourceInputs["deduceMappings"] = state?.deduceMappings;
resourceInputs["deferValidation"] = state?.deferValidation;
resourceInputs["description"] = state?.description;
resourceInputs["destination"] = state?.destination;
resourceInputs["docsPerSecond"] = state?.docsPerSecond;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["frequency"] = state?.frequency;
resourceInputs["latest"] = state?.latest;
resourceInputs["maxPageSearchSize"] = state?.maxPageSearchSize;
resourceInputs["metadata"] = state?.metadata;
resourceInputs["name"] = state?.name;
resourceInputs["numFailureRetries"] = state?.numFailureRetries;
resourceInputs["pivot"] = state?.pivot;
resourceInputs["retentionPolicy"] = state?.retentionPolicy;
resourceInputs["source"] = state?.source;
resourceInputs["sync"] = state?.sync;
resourceInputs["timeout"] = state?.timeout;
resourceInputs["unattended"] = state?.unattended;
} else {
const args = argsOrState as ElasticsearchTransformArgs | undefined;
if (args?.destination === undefined && !opts.urn) {
throw new Error("Missing required property 'destination'");
}
if (args?.source === undefined && !opts.urn) {
throw new Error("Missing required property 'source'");
}
resourceInputs["alignCheckpoints"] = args?.alignCheckpoints;
resourceInputs["datesAsEpochMillis"] = args?.datesAsEpochMillis;
resourceInputs["deduceMappings"] = args?.deduceMappings;
resourceInputs["deferValidation"] = args?.deferValidation;
resourceInputs["description"] = args?.description;
resourceInputs["destination"] = args?.destination;
resourceInputs["docsPerSecond"] = args?.docsPerSecond;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["frequency"] = args?.frequency;
resourceInputs["latest"] = args?.latest;
resourceInputs["maxPageSearchSize"] = args?.maxPageSearchSize;
resourceInputs["metadata"] = args?.metadata;
resourceInputs["name"] = args?.name;
resourceInputs["numFailureRetries"] = args?.numFailureRetries;
resourceInputs["pivot"] = args?.pivot;
resourceInputs["retentionPolicy"] = args?.retentionPolicy;
resourceInputs["source"] = args?.source;
resourceInputs["sync"] = args?.sync;
resourceInputs["timeout"] = args?.timeout;
resourceInputs["unattended"] = args?.unattended;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ElasticsearchTransform.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
}
}
/**
* Input properties used for looking up and filtering ElasticsearchTransform resources.
*/
export interface ElasticsearchTransformState {
/**
* Specifies whether the transform checkpoint ranges should be optimized for performance.
*/
alignCheckpoints?: pulumi.Input<boolean>;
/**
* Defines if dates in the output should be written as ISO formatted string (default) or as millis since epoch.
*/
datesAsEpochMillis?: pulumi.Input<boolean>;
/**
* Specifies whether the transform should deduce the destination index mappings from the transform config.
*/
deduceMappings?: pulumi.Input<boolean>;
/**
* When true, deferrable validations are not run upon creation, but rather when the transform is started. This behavior may
* be desired if the source index does not exist until after the transform is created. Default is `false`
*/
deferValidation?: pulumi.Input<boolean>;
/**
* Free text description of the transform.
*/
description?: pulumi.Input<string>;
/**
* The destination for the transform.
*/
destination?: pulumi.Input<inputs.ElasticsearchTransformDestination>;
/**
* Specifies a limit on the number of input documents per second. Default (unset) value disables throttling.
*/
docsPerSecond?: pulumi.Input<number>;
/**
* Controls whether the transform should be started or stopped. Default is `false` (stopped).
*/
enabled?: pulumi.Input<boolean>;
/**
* The interval between checks for changes in the source indices when the transform is running continuously. Defaults to
* `1m`.
*/
frequency?: pulumi.Input<string>;
/**
* The latest method transforms the data by finding the latest document for each unique key. JSON definition expected.
* Either 'pivot' or 'latest' must be present.
*/
latest?: pulumi.Input<string>;
/**
* Defines the initial page size to use for the composite aggregation for each checkpoint. Default is 500.
*/
maxPageSearchSize?: pulumi.Input<number>;
/**
* Defines optional transform metadata.
*/
metadata?: pulumi.Input<string>;
/**
* Name of the transform you wish to create.
*/
name?: pulumi.Input<string>;
/**
* Defines the number of retries on a recoverable failure before the transform task is marked as failed. The default value
* is the cluster-level setting num_transform_failure_retries.
*/
numFailureRetries?: pulumi.Input<number>;
/**
* The pivot method transforms the data by aggregating and grouping it. JSON definition expected. Either 'pivot' or
* 'latest' must be present.
*/
pivot?: pulumi.Input<string>;
/**
* Defines a retention policy for the transform.
*/
retentionPolicy?: pulumi.Input<inputs.ElasticsearchTransformRetentionPolicy>;
/**
* The source of the data for the transform.
*/
source?: pulumi.Input<inputs.ElasticsearchTransformSource>;
/**
* Defines the properties transforms require to run continuously.
*/
sync?: pulumi.Input<inputs.ElasticsearchTransformSync>;
/**
* Period to wait for a response from Elasticsearch when performing any management operation. If no response is received
* before the timeout expires, the operation fails and returns an error. Defaults to `30s`.
*/
timeout?: pulumi.Input<string>;
/**
* In unattended mode, the transform retries indefinitely in case of an error which means the transform never fails.
*/
unattended?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a ElasticsearchTransform resource.
*/
export interface ElasticsearchTransformArgs {
/**
* Specifies whether the transform checkpoint ranges should be optimized for performance.
*/
alignCheckpoints?: pulumi.Input<boolean>;
/**
* Defines if dates in the output should be written as ISO formatted string (default) or as millis since epoch.
*/
datesAsEpochMillis?: pulumi.Input<boolean>;
/**
* Specifies whether the transform should deduce the destination index mappings from the transform config.
*/
deduceMappings?: pulumi.Input<boolean>;
/**
* When true, deferrable validations are not run upon creation, but rather when the transform is started. This behavior may
* be desired if the source index does not exist until after the transform is created. Default is `false`
*/
deferValidation?: pulumi.Input<boolean>;
/**
* Free text description of the transform.
*/
description?: pulumi.Input<string>;
/**
* The destination for the transform.
*/
destination: pulumi.Input<inputs.ElasticsearchTransformDestination>;
/**
* Specifies a limit on the number of input documents per second. Default (unset) value disables throttling.
*/
docsPerSecond?: pulumi.Input<number>;
/**
* Controls whether the transform should be started or stopped. Default is `false` (stopped).
*/
enabled?: pulumi.Input<boolean>;
/**
* The interval between checks for changes in the source indices when the transform is running continuously. Defaults to
* `1m`.
*/
frequency?: pulumi.Input<string>;
/**
* The latest method transforms the data by finding the latest document for each unique key. JSON definition expected.
* Either 'pivot' or 'latest' must be present.
*/
latest?: pulumi.Input<string>;
/**
* Defines the initial page size to use for the composite aggregation for each checkpoint. Default is 500.
*/
maxPageSearchSize?: pulumi.Input<number>;
/**
* Defines optional transform metadata.
*/
metadata?: pulumi.Input<string>;
/**
* Name of the transform you wish to create.
*/
name?: pulumi.Input<string>;
/**
* Defines the number of retries on a recoverable failure before the transform task is marked as failed. The default value
* is the cluster-level setting num_transform_failure_retries.
*/
numFailureRetries?: pulumi.Input<number>;
/**
* The pivot method transforms the data by aggregating and grouping it. JSON definition expected. Either 'pivot' or
* 'latest' must be present.
*/
pivot?: pulumi.Input<string>;
/**
* Defines a retention policy for the transform.
*/
retentionPolicy?: pulumi.Input<inputs.ElasticsearchTransformRetentionPolicy>;
/**
* The source of the data for the transform.
*/
source: pulumi.Input<inputs.ElasticsearchTransformSource>;
/**
* Defines the properties transforms require to run continuously.
*/
sync?: pulumi.Input<inputs.ElasticsearchTransformSync>;
/**
* Period to wait for a response from Elasticsearch when performing any management operation. If no response is received
* before the timeout expires, the operation fails and returns an error. Defaults to `30s`.
*/
timeout?: pulumi.Input<string>;
/**
* In unattended mode, the transform retries indefinitely in case of an error which means the transform never fails.
*/
unattended?: pulumi.Input<boolean>;
}