@aws-sdk/client-timestream-query 3.42.0 → 3.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +3 -2
  3. package/dist-cjs/TimestreamQuery.js +150 -0
  4. package/dist-cjs/commands/CreateScheduledQueryCommand.js +38 -0
  5. package/dist-cjs/commands/DeleteScheduledQueryCommand.js +38 -0
  6. package/dist-cjs/commands/DescribeScheduledQueryCommand.js +38 -0
  7. package/dist-cjs/commands/ExecuteScheduledQueryCommand.js +38 -0
  8. package/dist-cjs/commands/ListScheduledQueriesCommand.js +38 -0
  9. package/dist-cjs/commands/ListTagsForResourceCommand.js +38 -0
  10. package/dist-cjs/commands/PrepareQueryCommand.js +38 -0
  11. package/dist-cjs/commands/TagResourceCommand.js +38 -0
  12. package/dist-cjs/commands/UntagResourceCommand.js +38 -0
  13. package/dist-cjs/commands/UpdateScheduledQueryCommand.js +38 -0
  14. package/dist-cjs/commands/index.js +10 -0
  15. package/dist-cjs/endpoints.js +1 -0
  16. package/dist-cjs/models/models_0.js +275 -39
  17. package/dist-cjs/pagination/ListScheduledQueriesPaginator.js +35 -0
  18. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +35 -0
  19. package/dist-cjs/pagination/index.js +2 -0
  20. package/dist-cjs/protocols/Aws_json1_0.js +1580 -34
  21. package/dist-cjs/runtimeConfig.browser.js +7 -2
  22. package/dist-cjs/runtimeConfig.js +9 -3
  23. package/dist-es/TimestreamQuery.js +150 -0
  24. package/dist-es/commands/CreateScheduledQueryCommand.js +41 -0
  25. package/dist-es/commands/DeleteScheduledQueryCommand.js +41 -0
  26. package/dist-es/commands/DescribeScheduledQueryCommand.js +41 -0
  27. package/dist-es/commands/ExecuteScheduledQueryCommand.js +41 -0
  28. package/dist-es/commands/ListScheduledQueriesCommand.js +41 -0
  29. package/dist-es/commands/ListTagsForResourceCommand.js +41 -0
  30. package/dist-es/commands/PrepareQueryCommand.js +41 -0
  31. package/dist-es/commands/TagResourceCommand.js +41 -0
  32. package/dist-es/commands/UntagResourceCommand.js +41 -0
  33. package/dist-es/commands/UpdateScheduledQueryCommand.js +41 -0
  34. package/dist-es/commands/index.js +10 -0
  35. package/dist-es/endpoints.js +1 -0
  36. package/dist-es/models/models_0.js +192 -28
  37. package/dist-es/pagination/ListScheduledQueriesPaginator.js +74 -0
  38. package/dist-es/pagination/ListTagsForResourcePaginator.js +74 -0
  39. package/dist-es/pagination/index.js +2 -0
  40. package/dist-es/protocols/Aws_json1_0.js +1678 -106
  41. package/dist-es/runtimeConfig.browser.js +12 -3
  42. package/dist-es/runtimeConfig.js +13 -6
  43. package/dist-types/TimestreamQuery.d.ts +132 -19
  44. package/dist-types/TimestreamQueryClient.d.ts +20 -6
  45. package/dist-types/commands/CancelQueryCommand.d.ts +6 -5
  46. package/dist-types/commands/CreateScheduledQueryCommand.d.ts +39 -0
  47. package/dist-types/commands/DeleteScheduledQueryCommand.d.ts +35 -0
  48. package/dist-types/commands/DescribeEndpointsCommand.d.ts +15 -9
  49. package/dist-types/commands/DescribeScheduledQueryCommand.d.ts +35 -0
  50. package/dist-types/commands/ExecuteScheduledQueryCommand.d.ts +35 -0
  51. package/dist-types/commands/ListScheduledQueriesCommand.d.ts +35 -0
  52. package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
  53. package/dist-types/commands/PrepareQueryCommand.d.ts +37 -0
  54. package/dist-types/commands/QueryCommand.d.ts +30 -2
  55. package/dist-types/commands/TagResourceCommand.d.ts +37 -0
  56. package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
  57. package/dist-types/commands/UpdateScheduledQueryCommand.d.ts +35 -0
  58. package/dist-types/commands/index.d.ts +10 -0
  59. package/dist-types/models/models_0.d.ts +1137 -191
  60. package/dist-types/pagination/ListScheduledQueriesPaginator.d.ts +4 -0
  61. package/dist-types/pagination/ListTagsForResourcePaginator.d.ts +4 -0
  62. package/dist-types/pagination/index.d.ts +2 -0
  63. package/dist-types/protocols/Aws_json1_0.d.ts +30 -0
  64. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  65. package/dist-types/runtimeConfig.d.ts +4 -3
  66. package/dist-types/runtimeConfig.native.d.ts +1 -0
  67. package/dist-types/ts3.4/TimestreamQuery.d.ts +50 -0
  68. package/dist-types/ts3.4/TimestreamQueryClient.d.ts +15 -3
  69. package/dist-types/ts3.4/commands/CreateScheduledQueryCommand.d.ts +17 -0
  70. package/dist-types/ts3.4/commands/DeleteScheduledQueryCommand.d.ts +17 -0
  71. package/dist-types/ts3.4/commands/DescribeScheduledQueryCommand.d.ts +17 -0
  72. package/dist-types/ts3.4/commands/ExecuteScheduledQueryCommand.d.ts +17 -0
  73. package/dist-types/ts3.4/commands/ListScheduledQueriesCommand.d.ts +17 -0
  74. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
  75. package/dist-types/ts3.4/commands/PrepareQueryCommand.d.ts +17 -0
  76. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
  77. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
  78. package/dist-types/ts3.4/commands/UpdateScheduledQueryCommand.d.ts +17 -0
  79. package/dist-types/ts3.4/commands/index.d.ts +10 -0
  80. package/dist-types/ts3.4/models/models_0.d.ts +526 -26
  81. package/dist-types/ts3.4/pagination/ListScheduledQueriesPaginator.d.ts +4 -0
  82. package/dist-types/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +4 -0
  83. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  84. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +30 -0
  85. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
  86. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
  87. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  88. package/package.json +39 -46
@@ -1,238 +1,1055 @@
1
1
  import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
2
+ /**
3
+ * <p> You are not authorized to perform this action. </p>
4
+ */
5
+ export interface AccessDeniedException extends __SmithyException, $MetadataBearer {
6
+ name: "AccessDeniedException";
7
+ $fault: "client";
8
+ Message?: string;
9
+ }
10
+ export interface CancelQueryRequest {
11
+ /**
12
+ * <p> The ID of the query that needs to be cancelled. <code>QueryID</code> is returned as
13
+ * part of the query result. </p>
14
+ */
15
+ QueryId: string | undefined;
16
+ }
17
+ export declare namespace CancelQueryRequest {
18
+ /**
19
+ * @internal
20
+ */
21
+ const filterSensitiveLog: (obj: CancelQueryRequest) => any;
22
+ }
23
+ export interface CancelQueryResponse {
24
+ /**
25
+ * <p> A <code>CancellationMessage</code> is returned when a <code>CancelQuery</code>
26
+ * request for the query specified by <code>QueryId</code> has already been issued. </p>
27
+ */
28
+ CancellationMessage?: string;
29
+ }
30
+ export declare namespace CancelQueryResponse {
31
+ /**
32
+ * @internal
33
+ */
34
+ const filterSensitiveLog: (obj: CancelQueryResponse) => any;
35
+ }
2
36
  /**
3
37
  * <p>
4
- * You are not authorized to perform this action.
38
+ * Timestream was unable to fully process this request because of an internal
39
+ * server error. </p>
40
+ */
41
+ export interface InternalServerException extends __SmithyException, $MetadataBearer {
42
+ name: "InternalServerException";
43
+ $fault: "server";
44
+ Message?: string;
45
+ }
46
+ /**
47
+ * <p>The requested endpoint was not valid.</p>
48
+ */
49
+ export interface InvalidEndpointException extends __SmithyException, $MetadataBearer {
50
+ name: "InvalidEndpointException";
51
+ $fault: "client";
52
+ Message?: string;
53
+ }
54
+ /**
55
+ * <p>The request was denied due to request throttling.</p>
56
+ */
57
+ export interface ThrottlingException extends __SmithyException, $MetadataBearer {
58
+ name: "ThrottlingException";
59
+ $fault: "client";
60
+ Message?: string;
61
+ }
62
+ /**
63
+ * <p> Invalid or malformed request. </p>
64
+ */
65
+ export interface ValidationException extends __SmithyException, $MetadataBearer {
66
+ name: "ValidationException";
67
+ $fault: "client";
68
+ Message?: string;
69
+ }
70
+ export declare enum ScalarType {
71
+ BIGINT = "BIGINT",
72
+ BOOLEAN = "BOOLEAN",
73
+ DATE = "DATE",
74
+ DOUBLE = "DOUBLE",
75
+ INTEGER = "INTEGER",
76
+ INTERVAL_DAY_TO_SECOND = "INTERVAL_DAY_TO_SECOND",
77
+ INTERVAL_YEAR_TO_MONTH = "INTERVAL_YEAR_TO_MONTH",
78
+ TIME = "TIME",
79
+ TIMESTAMP = "TIMESTAMP",
80
+ UNKNOWN = "UNKNOWN",
81
+ VARCHAR = "VARCHAR"
82
+ }
83
+ /**
84
+ * <p> Unable to poll results for a cancelled query. </p>
85
+ */
86
+ export interface ConflictException extends __SmithyException, $MetadataBearer {
87
+ name: "ConflictException";
88
+ $fault: "client";
89
+ Message?: string;
90
+ }
91
+ export declare enum S3EncryptionOption {
92
+ SSE_KMS = "SSE_KMS",
93
+ SSE_S3 = "SSE_S3"
94
+ }
95
+ /**
96
+ * <p>Details on S3 location for error reports that result from running a query. </p>
97
+ */
98
+ export interface S3Configuration {
99
+ /**
100
+ * <p> Name of the S3 bucket under which error reports will be created.</p>
101
+ */
102
+ BucketName: string | undefined;
103
+ /**
104
+ * <p> Prefix for the error report key. Timestream by default adds the following prefix to
105
+ * the error report path. </p>
106
+ */
107
+ ObjectKeyPrefix?: string;
108
+ /**
109
+ * <p> Encryption at rest options for the error reports. If no encryption option is
110
+ * specified, Timestream will choose SSE_S3 as default. </p>
111
+ */
112
+ EncryptionOption?: S3EncryptionOption | string;
113
+ }
114
+ export declare namespace S3Configuration {
115
+ /**
116
+ * @internal
117
+ */
118
+ const filterSensitiveLog: (obj: S3Configuration) => any;
119
+ }
120
+ /**
121
+ * <p>Configuration required for error reporting.</p>
122
+ */
123
+ export interface ErrorReportConfiguration {
124
+ /**
125
+ * <p>The S3 configuration for the error reports.</p>
126
+ */
127
+ S3Configuration: S3Configuration | undefined;
128
+ }
129
+ export declare namespace ErrorReportConfiguration {
130
+ /**
131
+ * @internal
132
+ */
133
+ const filterSensitiveLog: (obj: ErrorReportConfiguration) => any;
134
+ }
135
+ /**
136
+ * <p>Details on SNS that are required to send the notification.</p>
137
+ */
138
+ export interface SnsConfiguration {
139
+ /**
140
+ * <p>SNS topic ARN that the scheduled query status notifications will be sent to.</p>
141
+ */
142
+ TopicArn: string | undefined;
143
+ }
144
+ export declare namespace SnsConfiguration {
145
+ /**
146
+ * @internal
147
+ */
148
+ const filterSensitiveLog: (obj: SnsConfiguration) => any;
149
+ }
150
+ /**
151
+ * <p>Notification configuration for a scheduled query. A notification is sent by
152
+ * Timestream when a scheduled query is created, its state is updated or when it is deleted. </p>
153
+ */
154
+ export interface NotificationConfiguration {
155
+ /**
156
+ * <p>Details on SNS configuration. </p>
157
+ */
158
+ SnsConfiguration: SnsConfiguration | undefined;
159
+ }
160
+ export declare namespace NotificationConfiguration {
161
+ /**
162
+ * @internal
163
+ */
164
+ const filterSensitiveLog: (obj: NotificationConfiguration) => any;
165
+ }
166
+ /**
167
+ * <p>Configuration of the schedule of the query.</p>
168
+ */
169
+ export interface ScheduleConfiguration {
170
+ /**
171
+ * <p>An expression that denotes when to trigger the scheduled query run. This can be a cron
172
+ * expression or a rate expression. </p>
173
+ */
174
+ ScheduleExpression: string | undefined;
175
+ }
176
+ export declare namespace ScheduleConfiguration {
177
+ /**
178
+ * @internal
179
+ */
180
+ const filterSensitiveLog: (obj: ScheduleConfiguration) => any;
181
+ }
182
+ /**
183
+ * <p>A tag is a label that you assign to a Timestream database and/or table. Each tag
184
+ * consists of a key and an optional value, both of which you define. Tags enable you to
185
+ * categorize databases and/or tables, for example, by purpose, owner, or environment.
186
+ * </p>
187
+ */
188
+ export interface Tag {
189
+ /**
190
+ * <p>The key of the tag. Tag keys are case sensitive. </p>
191
+ */
192
+ Key: string | undefined;
193
+ /**
194
+ * <p>The value of the tag. Tag values are case sensitive and can be null. </p>
195
+ */
196
+ Value: string | undefined;
197
+ }
198
+ export declare namespace Tag {
199
+ /**
200
+ * @internal
201
+ */
202
+ const filterSensitiveLog: (obj: Tag) => any;
203
+ }
204
+ export declare enum DimensionValueType {
205
+ VARCHAR = "VARCHAR"
206
+ }
207
+ /**
208
+ * <p>This type is used to map column(s) from the query result to a dimension in the
209
+ * destination table.</p>
210
+ */
211
+ export interface DimensionMapping {
212
+ /**
213
+ * <p>Column name from query result.</p>
214
+ */
215
+ Name: string | undefined;
216
+ /**
217
+ * <p>Type for the dimension. </p>
218
+ */
219
+ DimensionValueType: DimensionValueType | string | undefined;
220
+ }
221
+ export declare namespace DimensionMapping {
222
+ /**
223
+ * @internal
224
+ */
225
+ const filterSensitiveLog: (obj: DimensionMapping) => any;
226
+ }
227
+ export declare enum MeasureValueType {
228
+ BIGINT = "BIGINT",
229
+ BOOLEAN = "BOOLEAN",
230
+ DOUBLE = "DOUBLE",
231
+ MULTI = "MULTI",
232
+ VARCHAR = "VARCHAR"
233
+ }
234
+ export declare enum ScalarMeasureValueType {
235
+ BIGINT = "BIGINT",
236
+ BOOLEAN = "BOOLEAN",
237
+ DOUBLE = "DOUBLE",
238
+ VARCHAR = "VARCHAR"
239
+ }
240
+ /**
241
+ * <p>Attribute mapping for MULTI value measures.</p>
242
+ */
243
+ export interface MultiMeasureAttributeMapping {
244
+ /**
245
+ * <p>Source column from where the attribute value is to be read.</p>
246
+ */
247
+ SourceColumn: string | undefined;
248
+ /**
249
+ * <p>Custom name to be used for attribute name in derived table. If not provided, source
250
+ * column name would be used.</p>
251
+ */
252
+ TargetMultiMeasureAttributeName?: string;
253
+ /**
254
+ * <p>Type of the attribute to be read from the source column.</p>
255
+ */
256
+ MeasureValueType: ScalarMeasureValueType | string | undefined;
257
+ }
258
+ export declare namespace MultiMeasureAttributeMapping {
259
+ /**
260
+ * @internal
261
+ */
262
+ const filterSensitiveLog: (obj: MultiMeasureAttributeMapping) => any;
263
+ }
264
+ /**
265
+ * <p>MixedMeasureMappings are mappings that can be used to ingest data into a mixture of
266
+ * narrow and multi measures in the derived table.</p>
267
+ */
268
+ export interface MixedMeasureMapping {
269
+ /**
270
+ * <p>Refers to the value of measure_name in a result row. This field is required if
271
+ * MeasureNameColumn is provided.</p>
272
+ */
273
+ MeasureName?: string;
274
+ /**
275
+ * <p>This field refers to the source column from which measure-value is to be read for
276
+ * result materialization.</p>
277
+ */
278
+ SourceColumn?: string;
279
+ /**
280
+ * <p>Target measure name to be used. If not provided, the target measure name by default
281
+ * would be measure-name if provided, or sourceColumn otherwise. </p>
282
+ */
283
+ TargetMeasureName?: string;
284
+ /**
285
+ * <p>Type of the value that is to be read from sourceColumn. If the mapping is for MULTI,
286
+ * use MeasureValueType.MULTI.</p>
287
+ */
288
+ MeasureValueType: MeasureValueType | string | undefined;
289
+ /**
290
+ * <p>Required when measureValueType is MULTI. Attribute mappings for MULTI value
291
+ * measures.</p>
292
+ */
293
+ MultiMeasureAttributeMappings?: MultiMeasureAttributeMapping[];
294
+ }
295
+ export declare namespace MixedMeasureMapping {
296
+ /**
297
+ * @internal
298
+ */
299
+ const filterSensitiveLog: (obj: MixedMeasureMapping) => any;
300
+ }
301
+ /**
302
+ * <p>Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided.
303
+ * MultiMeasureMappings can be used to ingest data as multi measures in the derived
304
+ * table.</p>
305
+ */
306
+ export interface MultiMeasureMappings {
307
+ /**
308
+ * <p>The name of the target multi-measure name in the derived table. This input is required
309
+ * when measureNameColumn is not provided. If MeasureNameColumn is provided, then value
310
+ * from that column will be used as multi-measure name.</p>
311
+ */
312
+ TargetMultiMeasureName?: string;
313
+ /**
314
+ * <p>Required. Attribute mappings to be used for mapping query results to ingest data for
315
+ * multi-measure attributes.</p>
316
+ */
317
+ MultiMeasureAttributeMappings: MultiMeasureAttributeMapping[] | undefined;
318
+ }
319
+ export declare namespace MultiMeasureMappings {
320
+ /**
321
+ * @internal
322
+ */
323
+ const filterSensitiveLog: (obj: MultiMeasureMappings) => any;
324
+ }
325
+ /**
326
+ * <p> Configuration to write data into Timestream database and table. This configuration
327
+ * allows the user to map the query result select columns into the destination table
328
+ * columns. </p>
329
+ */
330
+ export interface TimestreamConfiguration {
331
+ /**
332
+ * <p>Name of Timestream database to which the query result will be written.</p>
333
+ */
334
+ DatabaseName: string | undefined;
335
+ /**
336
+ * <p>Name of Timestream table that the query result will be written to. The table should
337
+ * be within the same database that is provided in Timestream configuration.</p>
338
+ */
339
+ TableName: string | undefined;
340
+ /**
341
+ * <p>Column from query result that should be used as the time column in destination table.
342
+ * Column type for this should be TIMESTAMP.</p>
343
+ */
344
+ TimeColumn: string | undefined;
345
+ /**
346
+ * <p> This is to allow mapping column(s) from the query result to the dimension in the
347
+ * destination table. </p>
348
+ */
349
+ DimensionMappings: DimensionMapping[] | undefined;
350
+ /**
351
+ * <p>Multi-measure mappings.</p>
352
+ */
353
+ MultiMeasureMappings?: MultiMeasureMappings;
354
+ /**
355
+ * <p>Specifies how to map measures to multi-measure records.</p>
356
+ */
357
+ MixedMeasureMappings?: MixedMeasureMapping[];
358
+ /**
359
+ * <p>Name of the measure column.</p>
360
+ */
361
+ MeasureNameColumn?: string;
362
+ }
363
+ export declare namespace TimestreamConfiguration {
364
+ /**
365
+ * @internal
366
+ */
367
+ const filterSensitiveLog: (obj: TimestreamConfiguration) => any;
368
+ }
369
+ /**
370
+ * <p>Configuration used for writing the output of a query.</p>
371
+ */
372
+ export interface TargetConfiguration {
373
+ /**
374
+ * <p>Configuration needed to write data into the Timestream database and table.</p>
375
+ */
376
+ TimestreamConfiguration: TimestreamConfiguration | undefined;
377
+ }
378
+ export declare namespace TargetConfiguration {
379
+ /**
380
+ * @internal
381
+ */
382
+ const filterSensitiveLog: (obj: TargetConfiguration) => any;
383
+ }
384
+ export interface CreateScheduledQueryRequest {
385
+ /**
386
+ * <p>Name of the scheduled query.</p>
387
+ */
388
+ Name: string | undefined;
389
+ /**
390
+ * <p>The query string to run. Parameter
391
+ * names can be specified in the query string <code>@</code> character followed by an
392
+ * identifier. The named Parameter <code>@scheduled_runtime</code> is reserved and can be used in the query to get the time at which the query is scheduled to run.</p>
393
+ * <p>The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of <code>@scheduled_runtime</code> paramater for each query run.
394
+ * For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the <code>@scheduled_runtime</code> parameter is
395
+ * initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.</p>
396
+ */
397
+ QueryString: string | undefined;
398
+ /**
399
+ * <p>The schedule configuration for the query.</p>
400
+ */
401
+ ScheduleConfiguration: ScheduleConfiguration | undefined;
402
+ /**
403
+ * <p>Notification configuration for the scheduled query. A notification is sent by
404
+ * Timestream when a query run finishes, when the state is updated or when you delete it. </p>
405
+ */
406
+ NotificationConfiguration: NotificationConfiguration | undefined;
407
+ /**
408
+ * <p>Configuration used for writing the result of a query.</p>
409
+ */
410
+ TargetConfiguration?: TargetConfiguration;
411
+ /**
412
+ * <p>Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making
413
+ * multiple identical CreateScheduledQuery requests has the same effect as making a single request.
414
+ *
415
+ * </p>
416
+ * <ul>
417
+ * <li>
418
+ * <p> If CreateScheduledQuery is called without a <code>ClientToken</code>, the
419
+ * Query SDK generates a <code>ClientToken</code> on your behalf.</p>
420
+ * </li>
421
+ * <li>
422
+ * <p> After 8 hours, any request with the same <code>ClientToken</code> is treated
423
+ * as a new request. </p>
424
+ * </li>
425
+ * </ul>
426
+ */
427
+ ClientToken?: string;
428
+ /**
429
+ * <p>The ARN for the IAM role that Timestream will assume when running the scheduled query. </p>
430
+ */
431
+ ScheduledQueryExecutionRoleArn: string | undefined;
432
+ /**
433
+ * <p>A list of key-value pairs to label the scheduled query.</p>
434
+ */
435
+ Tags?: Tag[];
436
+ /**
437
+ * <p>The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS
438
+ * key is not specified, the scheduled query resource will be encrypted with a Timestream
439
+ * owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias
440
+ * ARN. When using an alias name, prefix the name with <i>alias/</i>
441
+ * </p>
442
+ * <p>If ErrorReportConfiguration uses <code>SSE_KMS</code> as encryption type, the same KmsKeyId is used to encrypt the error report at rest.</p>
443
+ */
444
+ KmsKeyId?: string;
445
+ /**
446
+ * <p>Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results. </p>
447
+ */
448
+ ErrorReportConfiguration: ErrorReportConfiguration | undefined;
449
+ }
450
+ export declare namespace CreateScheduledQueryRequest {
451
+ /**
452
+ * @internal
453
+ */
454
+ const filterSensitiveLog: (obj: CreateScheduledQueryRequest) => any;
455
+ }
456
+ export interface CreateScheduledQueryResponse {
457
+ /**
458
+ * <p>ARN for the created scheduled query.</p>
459
+ */
460
+ Arn: string | undefined;
461
+ }
462
+ export declare namespace CreateScheduledQueryResponse {
463
+ /**
464
+ * @internal
465
+ */
466
+ const filterSensitiveLog: (obj: CreateScheduledQueryResponse) => any;
467
+ }
468
+ /**
469
+ * <p>You have exceeded the service quota.</p>
470
+ */
471
+ export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer {
472
+ name: "ServiceQuotaExceededException";
473
+ $fault: "client";
474
+ Message?: string;
475
+ }
476
+ export interface DeleteScheduledQueryRequest {
477
+ /**
478
+ * <p>The ARN of the scheduled query. </p>
479
+ */
480
+ ScheduledQueryArn: string | undefined;
481
+ }
482
+ export declare namespace DeleteScheduledQueryRequest {
483
+ /**
484
+ * @internal
485
+ */
486
+ const filterSensitiveLog: (obj: DeleteScheduledQueryRequest) => any;
487
+ }
488
+ /**
489
+ * <p>The requested resource could not be found.</p>
490
+ */
491
+ export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer {
492
+ name: "ResourceNotFoundException";
493
+ $fault: "client";
494
+ Message?: string;
495
+ /**
496
+ * <p>The ARN of the scheduled query.</p>
497
+ */
498
+ ScheduledQueryArn?: string;
499
+ }
500
+ export interface DescribeEndpointsRequest {
501
+ }
502
+ export declare namespace DescribeEndpointsRequest {
503
+ /**
504
+ * @internal
505
+ */
506
+ const filterSensitiveLog: (obj: DescribeEndpointsRequest) => any;
507
+ }
508
+ /**
509
+ * <p>Represents an available endpoint against which to make API calls against, as well as
510
+ * the TTL for that endpoint.</p>
511
+ */
512
+ export interface Endpoint {
513
+ /**
514
+ * <p>An endpoint address.</p>
515
+ */
516
+ Address: string | undefined;
517
+ /**
518
+ * <p>The TTL for the endpoint, in minutes.</p>
519
+ */
520
+ CachePeriodInMinutes: number | undefined;
521
+ }
522
+ export declare namespace Endpoint {
523
+ /**
524
+ * @internal
525
+ */
526
+ const filterSensitiveLog: (obj: Endpoint) => any;
527
+ }
528
+ export interface DescribeEndpointsResponse {
529
+ /**
530
+ * <p>An <code>Endpoints</code> object is returned when a <code>DescribeEndpoints</code>
531
+ * request is made.</p>
532
+ */
533
+ Endpoints: Endpoint[] | undefined;
534
+ }
535
+ export declare namespace DescribeEndpointsResponse {
536
+ /**
537
+ * @internal
538
+ */
539
+ const filterSensitiveLog: (obj: DescribeEndpointsResponse) => any;
540
+ }
541
+ export interface DescribeScheduledQueryRequest {
542
+ /**
543
+ * <p>The ARN of the scheduled query.</p>
544
+ */
545
+ ScheduledQueryArn: string | undefined;
546
+ }
547
+ export declare namespace DescribeScheduledQueryRequest {
548
+ /**
549
+ * @internal
550
+ */
551
+ const filterSensitiveLog: (obj: DescribeScheduledQueryRequest) => any;
552
+ }
553
+ /**
554
+ * <p> S3 report location for the scheduled query run.</p>
555
+ */
556
+ export interface S3ReportLocation {
557
+ /**
558
+ * <p> S3 bucket name. </p>
559
+ */
560
+ BucketName?: string;
561
+ /**
562
+ * <p>S3 key. </p>
563
+ */
564
+ ObjectKey?: string;
565
+ }
566
+ export declare namespace S3ReportLocation {
567
+ /**
568
+ * @internal
569
+ */
570
+ const filterSensitiveLog: (obj: S3ReportLocation) => any;
571
+ }
572
+ /**
573
+ * <p>This contains the location of the error report for a single scheduled query call.
5
574
  * </p>
6
575
  */
7
- export interface AccessDeniedException extends __SmithyException, $MetadataBearer {
8
- name: "AccessDeniedException";
9
- $fault: "client";
10
- Message?: string;
576
+ export interface ErrorReportLocation {
577
+ /**
578
+ * <p>The S3 location where error reports are written.</p>
579
+ */
580
+ S3ReportLocation?: S3ReportLocation;
581
+ }
582
+ export declare namespace ErrorReportLocation {
583
+ /**
584
+ * @internal
585
+ */
586
+ const filterSensitiveLog: (obj: ErrorReportLocation) => any;
587
+ }
588
+ /**
589
+ * <p>Statistics for a single scheduled query run.</p>
590
+ */
591
+ export interface ExecutionStats {
592
+ /**
593
+ * <p>Total time, measured in milliseconds, that was needed for the scheduled query run to complete.</p>
594
+ */
595
+ ExecutionTimeInMillis?: number;
596
+ /**
597
+ * <p>Data writes metered for records ingested in a single scheduled query run.</p>
598
+ */
599
+ DataWrites?: number;
600
+ /**
601
+ * <p>Bytes metered for a single scheduled query run.</p>
602
+ */
603
+ BytesMetered?: number;
604
+ /**
605
+ * <p>The number of records ingested for a single scheduled query run. </p>
606
+ */
607
+ RecordsIngested?: number;
608
+ /**
609
+ * <p>Number of rows present in the output from running a query before ingestion to
610
+ * destination data source.</p>
611
+ */
612
+ QueryResultRows?: number;
613
+ }
614
+ export declare namespace ExecutionStats {
615
+ /**
616
+ * @internal
617
+ */
618
+ const filterSensitiveLog: (obj: ExecutionStats) => any;
619
+ }
620
+ export declare enum ScheduledQueryRunStatus {
621
+ AUTO_TRIGGER_FAILURE = "AUTO_TRIGGER_FAILURE",
622
+ AUTO_TRIGGER_SUCCESS = "AUTO_TRIGGER_SUCCESS",
623
+ MANUAL_TRIGGER_FAILURE = "MANUAL_TRIGGER_FAILURE",
624
+ MANUAL_TRIGGER_SUCCESS = "MANUAL_TRIGGER_SUCCESS"
625
+ }
626
+ /**
627
+ * <p>Run summary for the scheduled query</p>
628
+ */
629
+ export interface ScheduledQueryRunSummary {
630
+ /**
631
+ * <p>InvocationTime for this run. This is the time at which the query is scheduled to run.
632
+ * Parameter <code>@scheduled_runtime</code> can be used in the query to get the value. </p>
633
+ */
634
+ InvocationTime?: Date;
635
+ /**
636
+ * <p>The actual time when the query was run.</p>
637
+ */
638
+ TriggerTime?: Date;
639
+ /**
640
+ * <p>The status of a scheduled query run.</p>
641
+ */
642
+ RunStatus?: ScheduledQueryRunStatus | string;
643
+ /**
644
+ * <p>Runtime statistics for a scheduled run.</p>
645
+ */
646
+ ExecutionStats?: ExecutionStats;
647
+ /**
648
+ * <p>S3 location for error report.</p>
649
+ */
650
+ ErrorReportLocation?: ErrorReportLocation;
651
+ /**
652
+ * <p>Error message for the scheduled query in case of failure. You might have to look at
653
+ * the error report to get more detailed error reasons. </p>
654
+ */
655
+ FailureReason?: string;
656
+ }
657
+ export declare namespace ScheduledQueryRunSummary {
658
+ /**
659
+ * @internal
660
+ */
661
+ const filterSensitiveLog: (obj: ScheduledQueryRunSummary) => any;
662
+ }
663
+ export declare enum ScheduledQueryState {
664
+ DISABLED = "DISABLED",
665
+ ENABLED = "ENABLED"
666
+ }
667
+ /**
668
+ * <p>Structure that describes scheduled query.</p>
669
+ */
670
+ export interface ScheduledQueryDescription {
671
+ /**
672
+ * <p>Scheduled query ARN.</p>
673
+ */
674
+ Arn: string | undefined;
675
+ /**
676
+ * <p>Name of the scheduled query.</p>
677
+ */
678
+ Name: string | undefined;
679
+ /**
680
+ * <p>The query to be run.</p>
681
+ */
682
+ QueryString: string | undefined;
683
+ /**
684
+ * <p>Creation time of the scheduled query.</p>
685
+ */
686
+ CreationTime?: Date;
687
+ /**
688
+ * <p>State of the scheduled query. </p>
689
+ */
690
+ State: ScheduledQueryState | string | undefined;
691
+ /**
692
+ * <p>Last time the query was run.</p>
693
+ */
694
+ PreviousInvocationTime?: Date;
695
+ /**
696
+ * <p>The next time the scheduled query is scheduled to run.</p>
697
+ */
698
+ NextInvocationTime?: Date;
699
+ /**
700
+ * <p>Schedule configuration.</p>
701
+ */
702
+ ScheduleConfiguration: ScheduleConfiguration | undefined;
703
+ /**
704
+ * <p>Notification configuration.</p>
705
+ */
706
+ NotificationConfiguration: NotificationConfiguration | undefined;
707
+ /**
708
+ * <p>Scheduled query target store configuration.</p>
709
+ */
710
+ TargetConfiguration?: TargetConfiguration;
711
+ /**
712
+ * <p>IAM role that Timestream uses to run the schedule query.</p>
713
+ */
714
+ ScheduledQueryExecutionRoleArn?: string;
715
+ /**
716
+ * <p>A customer provided KMS key used to encrypt the scheduled query resource.</p>
717
+ */
718
+ KmsKeyId?: string;
719
+ /**
720
+ * <p>Error-reporting configuration for the scheduled query.</p>
721
+ */
722
+ ErrorReportConfiguration?: ErrorReportConfiguration;
723
+ /**
724
+ * <p>Runtime summary for the last scheduled query run. </p>
725
+ */
726
+ LastRunSummary?: ScheduledQueryRunSummary;
727
+ /**
728
+ * <p>Runtime summary for the last five failed scheduled query runs.</p>
729
+ */
730
+ RecentlyFailedRuns?: ScheduledQueryRunSummary[];
11
731
  }
12
- export declare namespace AccessDeniedException {
732
+ export declare namespace ScheduledQueryDescription {
13
733
  /**
14
734
  * @internal
15
735
  */
16
- const filterSensitiveLog: (obj: AccessDeniedException) => any;
736
+ const filterSensitiveLog: (obj: ScheduledQueryDescription) => any;
17
737
  }
18
- export interface CancelQueryRequest {
738
+ export interface DescribeScheduledQueryResponse {
19
739
  /**
20
- * <p>
21
- * The id of the query that needs to be cancelled. <code>QueryID</code> is returned as part of QueryResult.
22
- * </p>
740
+ * <p>The scheduled query.</p>
23
741
  */
24
- QueryId: string | undefined;
742
+ ScheduledQuery: ScheduledQueryDescription | undefined;
25
743
  }
26
- export declare namespace CancelQueryRequest {
744
+ export declare namespace DescribeScheduledQueryResponse {
27
745
  /**
28
746
  * @internal
29
747
  */
30
- const filterSensitiveLog: (obj: CancelQueryRequest) => any;
748
+ const filterSensitiveLog: (obj: DescribeScheduledQueryResponse) => any;
31
749
  }
32
- export interface CancelQueryResponse {
750
+ export interface ExecuteScheduledQueryRequest {
33
751
  /**
34
- * <p>
35
- * A <code>CancellationMessage</code> is returned when a <code>CancelQuery</code> request for the query specified by <code>QueryId</code> has already been issued.
36
- * </p>
752
+ * <p>ARN of the scheduled query.</p>
37
753
  */
38
- CancellationMessage?: string;
754
+ ScheduledQueryArn: string | undefined;
755
+ /**
756
+ * <p>The timestamp in UTC. Query will be run as if it was invoked at this timestamp. </p>
757
+ */
758
+ InvocationTime: Date | undefined;
759
+ /**
760
+ * <p>Not used. </p>
761
+ */
762
+ ClientToken?: string;
39
763
  }
40
- export declare namespace CancelQueryResponse {
764
+ export declare namespace ExecuteScheduledQueryRequest {
41
765
  /**
42
766
  * @internal
43
767
  */
44
- const filterSensitiveLog: (obj: CancelQueryResponse) => any;
768
+ const filterSensitiveLog: (obj: ExecuteScheduledQueryRequest) => any;
45
769
  }
46
- /**
47
- * <p>
48
- * Timestream was unable to fully process this request because of an internal server error.
49
- * </p>
50
- */
51
- export interface InternalServerException extends __SmithyException, $MetadataBearer {
52
- name: "InternalServerException";
53
- $fault: "server";
54
- Message?: string;
770
+ export interface ListScheduledQueriesRequest {
771
+ /**
772
+ * <p>The maximum number of items to return in the output. If the total number of items
773
+ * available is more than the value specified, a <code>NextToken</code> is provided in the
774
+ * output. To resume pagination, provide the <code>NextToken</code> value as the argument
775
+ * to the subsequent call to <code>ListScheduledQueriesRequest</code>.</p>
776
+ */
777
+ MaxResults?: number;
778
+ /**
779
+ * <p> A pagination token to resume pagination.</p>
780
+ */
781
+ NextToken?: string;
55
782
  }
56
- export declare namespace InternalServerException {
783
+ export declare namespace ListScheduledQueriesRequest {
57
784
  /**
58
785
  * @internal
59
786
  */
60
- const filterSensitiveLog: (obj: InternalServerException) => any;
787
+ const filterSensitiveLog: (obj: ListScheduledQueriesRequest) => any;
61
788
  }
62
789
  /**
63
- * <p>The requested endpoint was invalid.</p>
790
+ * <p>Destination for scheduled query.</p>
64
791
  */
65
- export interface InvalidEndpointException extends __SmithyException, $MetadataBearer {
66
- name: "InvalidEndpointException";
67
- $fault: "client";
68
- Message?: string;
792
+ export interface TimestreamDestination {
793
+ /**
794
+ * <p>Timestream database name. </p>
795
+ */
796
+ DatabaseName?: string;
797
+ /**
798
+ * <p>Timestream table name. </p>
799
+ */
800
+ TableName?: string;
69
801
  }
70
- export declare namespace InvalidEndpointException {
802
+ export declare namespace TimestreamDestination {
71
803
  /**
72
804
  * @internal
73
805
  */
74
- const filterSensitiveLog: (obj: InvalidEndpointException) => any;
806
+ const filterSensitiveLog: (obj: TimestreamDestination) => any;
75
807
  }
76
808
  /**
77
- * <p>The request was denied due to request throttling.</p>
809
+ * <p>Destination details to write data for a target data source. Current supported data
810
+ * source is Timestream.</p>
78
811
  */
79
- export interface ThrottlingException extends __SmithyException, $MetadataBearer {
80
- name: "ThrottlingException";
81
- $fault: "client";
82
- Message?: string;
812
+ export interface TargetDestination {
813
+ /**
814
+ * <p>Query result destination details for Timestream data source.</p>
815
+ */
816
+ TimestreamDestination?: TimestreamDestination;
83
817
  }
84
- export declare namespace ThrottlingException {
818
+ export declare namespace TargetDestination {
85
819
  /**
86
820
  * @internal
87
821
  */
88
- const filterSensitiveLog: (obj: ThrottlingException) => any;
822
+ const filterSensitiveLog: (obj: TargetDestination) => any;
89
823
  }
90
824
  /**
91
- * <p>
92
- * Invalid or malformed request.
93
- * </p>
825
+ * <p>Scheduled Query</p>
94
826
  */
95
- export interface ValidationException extends __SmithyException, $MetadataBearer {
96
- name: "ValidationException";
97
- $fault: "client";
98
- Message?: string;
827
+ export interface ScheduledQuery {
828
+ /**
829
+ * <p>The Amazon Resource Name.</p>
830
+ */
831
+ Arn: string | undefined;
832
+ /**
833
+ * <p>The name of the scheduled query.</p>
834
+ */
835
+ Name: string | undefined;
836
+ /**
837
+ * <p>The creation time of the scheduled query.</p>
838
+ */
839
+ CreationTime?: Date;
840
+ /**
841
+ * <p>State of scheduled query. </p>
842
+ */
843
+ State: ScheduledQueryState | string | undefined;
844
+ /**
845
+ * <p>The last time the scheduled query was run.</p>
846
+ */
847
+ PreviousInvocationTime?: Date;
848
+ /**
849
+ * <p>The next time the scheduled query is to be run.</p>
850
+ */
851
+ NextInvocationTime?: Date;
852
+ /**
853
+ * <p>Configuration for scheduled query error reporting.</p>
854
+ */
855
+ ErrorReportConfiguration?: ErrorReportConfiguration;
856
+ /**
857
+ * <p>Target data source where final scheduled query result will be written.</p>
858
+ */
859
+ TargetDestination?: TargetDestination;
860
+ /**
861
+ * <p>Status of the last scheduled query run.</p>
862
+ */
863
+ LastRunStatus?: ScheduledQueryRunStatus | string;
99
864
  }
100
- export declare namespace ValidationException {
865
+ export declare namespace ScheduledQuery {
101
866
  /**
102
867
  * @internal
103
868
  */
104
- const filterSensitiveLog: (obj: ValidationException) => any;
105
- }
106
- export declare enum ScalarType {
107
- BIGINT = "BIGINT",
108
- BOOLEAN = "BOOLEAN",
109
- DATE = "DATE",
110
- DOUBLE = "DOUBLE",
111
- INTEGER = "INTEGER",
112
- INTERVAL_DAY_TO_SECOND = "INTERVAL_DAY_TO_SECOND",
113
- INTERVAL_YEAR_TO_MONTH = "INTERVAL_YEAR_TO_MONTH",
114
- TIME = "TIME",
115
- TIMESTAMP = "TIMESTAMP",
116
- UNKNOWN = "UNKNOWN",
117
- VARCHAR = "VARCHAR"
869
+ const filterSensitiveLog: (obj: ScheduledQuery) => any;
118
870
  }
119
- /**
120
- * <p>
121
- * Unable to poll results for a cancelled query.
122
- * </p>
123
- */
124
- export interface ConflictException extends __SmithyException, $MetadataBearer {
125
- name: "ConflictException";
126
- $fault: "client";
127
- Message?: string;
871
+ export interface ListScheduledQueriesResponse {
872
+ /**
873
+ * <p>A list of scheduled queries.</p>
874
+ */
875
+ ScheduledQueries: ScheduledQuery[] | undefined;
876
+ /**
877
+ * <p>A token to specify where to start paginating. This is the NextToken from a previously
878
+ * truncated response.</p>
879
+ */
880
+ NextToken?: string;
128
881
  }
129
- export declare namespace ConflictException {
882
+ export declare namespace ListScheduledQueriesResponse {
130
883
  /**
131
884
  * @internal
132
885
  */
133
- const filterSensitiveLog: (obj: ConflictException) => any;
886
+ const filterSensitiveLog: (obj: ListScheduledQueriesResponse) => any;
134
887
  }
135
- export interface DescribeEndpointsRequest {
888
+ export interface ListTagsForResourceRequest {
889
+ /**
890
+ * <p>The Timestream resource with tags to be listed. This value is an Amazon Resource Name
891
+ * (ARN).</p>
892
+ */
893
+ ResourceARN: string | undefined;
894
+ /**
895
+ * <p>The maximum number of tags to return.</p>
896
+ */
897
+ MaxResults?: number;
898
+ /**
899
+ * <p>A pagination token to resume pagination.</p>
900
+ */
901
+ NextToken?: string;
136
902
  }
137
- export declare namespace DescribeEndpointsRequest {
903
+ export declare namespace ListTagsForResourceRequest {
138
904
  /**
139
905
  * @internal
140
906
  */
141
- const filterSensitiveLog: (obj: DescribeEndpointsRequest) => any;
907
+ const filterSensitiveLog: (obj: ListTagsForResourceRequest) => any;
142
908
  }
143
- /**
144
- * <p>Represents an available endpoint against which to make API calls agaisnt, as well as the TTL for that endpoint.</p>
145
- */
146
- export interface Endpoint {
909
+ export interface ListTagsForResourceResponse {
147
910
  /**
148
- * <p>An endpoint address.</p>
911
+ * <p>The tags currently associated with the Timestream resource. </p>
149
912
  */
150
- Address: string | undefined;
913
+ Tags: Tag[] | undefined;
151
914
  /**
152
- * <p>The TTL for the endpoint, in minutes.</p>
915
+ * <p>A pagination token to resume pagination with a subsequent call to
916
+ * <code>ListTagsForResourceResponse</code>.</p>
153
917
  */
154
- CachePeriodInMinutes: number | undefined;
918
+ NextToken?: string;
155
919
  }
156
- export declare namespace Endpoint {
920
+ export declare namespace ListTagsForResourceResponse {
157
921
  /**
158
922
  * @internal
159
923
  */
160
- const filterSensitiveLog: (obj: Endpoint) => any;
924
+ const filterSensitiveLog: (obj: ListTagsForResourceResponse) => any;
161
925
  }
162
- export interface DescribeEndpointsResponse {
926
+ export interface PrepareQueryRequest {
163
927
  /**
164
- * <p>An <code>Endpoints</code> object is returned when a <code>DescribeEndpoints</code> request is made.</p>
928
+ * <p>The Timestream query string that you want to use as a prepared statement. Parameter
929
+ * names can be specified in the query string <code>@</code> character followed by an
930
+ * identifier. </p>
165
931
  */
166
- Endpoints: Endpoint[] | undefined;
932
+ QueryString: string | undefined;
933
+ /**
934
+ * <p>By setting this value to <code>true</code>, Timestream will only validate that the
935
+ * query string is a valid Timestream query, and not store the prepared query for later
936
+ * use.</p>
937
+ */
938
+ ValidateOnly?: boolean;
167
939
  }
168
- export declare namespace DescribeEndpointsResponse {
940
+ export declare namespace PrepareQueryRequest {
169
941
  /**
170
942
  * @internal
171
943
  */
172
- const filterSensitiveLog: (obj: DescribeEndpointsResponse) => any;
944
+ const filterSensitiveLog: (obj: PrepareQueryRequest) => any;
173
945
  }
174
946
  /**
175
947
  * <p>
176
- * Timestream was unable to run the query successfully.
177
- * </p>
948
+ * Timestream was unable to run the query successfully. </p>
178
949
  */
179
950
  export interface QueryExecutionException extends __SmithyException, $MetadataBearer {
180
951
  name: "QueryExecutionException";
181
952
  $fault: "client";
182
953
  Message?: string;
183
954
  }
184
- export declare namespace QueryExecutionException {
185
- /**
186
- * @internal
187
- */
188
- const filterSensitiveLog: (obj: QueryExecutionException) => any;
189
- }
190
955
  export interface QueryRequest {
191
956
  /**
192
- * <p>
193
- * The query to be executed by Timestream.
194
- * </p>
957
+ * <p> The query to be run by Timestream. </p>
195
958
  */
196
959
  QueryString: string | undefined;
197
960
  /**
198
- * <p>
199
- * Unique, case-sensitive string of up to 64 ASCII characters that you specify when you make a Query request.
200
- * Providing a <code>ClientToken</code> makes the call to <code>Query</code> idempotent, meaning that multiple identical calls
201
- * have the same effect as one single call.
202
- * </p>
203
- *
204
- * <p>Your query request will fail in the following cases:</p>
205
- * <ul>
961
+ * <p> Unique, case-sensitive string of up to 64 ASCII characters specified when a
962
+ * <code>Query</code> request is made. Providing a <code>ClientToken</code> makes the
963
+ * call to <code>Query</code>
964
+ * <i>idempotent</i>. This means that running the same query repeatedly will
965
+ * produce the same result. In other words, making multiple identical <code>Query</code>
966
+ * requests has the same effect as making a single request. When using
967
+ * <code>ClientToken</code> in a query, note the following: </p>
968
+ * <ul>
206
969
  * <li>
207
- * <p>
208
- * If you submit a request with the same client token outside the 5-minute idepotency window.
209
- * </p>
210
- * </li>
970
+ * <p> If the Query API is instantiated without a <code>ClientToken</code>, the
971
+ * Query SDK generates a <code>ClientToken</code> on your behalf.</p>
972
+ * </li>
211
973
  * <li>
212
- * <p>
213
- * If you submit a request with the same client token but a change in other parameters within the 5-minute idempotency window.
214
- * </p>
215
- * </li>
974
+ * <p>If the <code>Query</code> invocation only contains the
975
+ * <code>ClientToken</code> but does not include a <code>NextToken</code>, that
976
+ * invocation of <code>Query</code> is assumed to be a new query run.</p>
977
+ * </li>
978
+ * <li>
979
+ * <p>If the invocation contains <code>NextToken</code>, that particular invocation
980
+ * is assumed to be a subsequent invocation of a prior call to the Query API, and a
981
+ * result set is returned.</p>
982
+ * </li>
983
+ * <li>
984
+ * <p> After 4 hours, any request with the same <code>ClientToken</code> is treated
985
+ * as a new request. </p>
986
+ * </li>
216
987
  * </ul>
217
- *
218
- * <p>
219
- * After 4 hours, any request with the same client token is treated as a new request.
220
- * </p>
221
988
  */
222
989
  ClientToken?: string;
223
990
  /**
224
- * <p>
225
- * A pagination token passed to get a set of results.
226
- * </p>
991
+ * <p> A pagination token used to return a set of results. When the <code>Query</code> API
992
+ * is invoked using <code>NextToken</code>, that particular invocation is assumed to be a
993
+ * subsequent invocation of a prior call to <code>Query</code>, and a result set is
994
+ * returned. However, if the <code>Query</code> invocation only contains the
995
+ * <code>ClientToken</code>, that invocation of <code>Query</code> is assumed to be a
996
+ * new query run. </p>
997
+ * <p>Note the following when using NextToken in a query:</p>
998
+ * <ul>
999
+ * <li>
1000
+ * <p>A pagination token can be used for up to five <code>Query</code> invocations,
1001
+ * OR for a duration of up to 1 hour – whichever comes first.</p>
1002
+ * </li>
1003
+ * <li>
1004
+ * <p>Using the same <code>NextToken</code> will return the same set of records. To
1005
+ * keep paginating through the result set, you must to use the most recent
1006
+ * <code>nextToken</code>.</p>
1007
+ * </li>
1008
+ * <li>
1009
+ * <p>Suppose a <code>Query</code> invocation returns two <code>NextToken</code>
1010
+ * values, <code>TokenA</code> and <code>TokenB</code>. If <code>TokenB</code> is
1011
+ * used in a subsequent <code>Query</code> invocation, then <code>TokenA</code> is
1012
+ * invalidated and cannot be reused.</p>
1013
+ * </li>
1014
+ * <li>
1015
+ * <p>To request a previous result set from a query after pagination has begun, you
1016
+ * must re-invoke the Query API.</p>
1017
+ * </li>
1018
+ * <li>
1019
+ * <p>The latest <code>NextToken</code> should be used to paginate until
1020
+ * <code>null</code> is returned, at which point a new <code>NextToken</code>
1021
+ * should be used.</p>
1022
+ * </li>
1023
+ * <li>
1024
+ * <p> If the IAM principal of the query initiator and the result reader are not the
1025
+ * same and/or the query initiator and the result reader do not have the same query
1026
+ * string in the query requests, the query will fail with an <code>Invalid
1027
+ * pagination token</code> error. </p>
1028
+ * </li>
1029
+ * </ul>
227
1030
  */
228
1031
  NextToken?: string;
229
1032
  /**
230
- * <p>
231
- * The total number of rows to return in the output. If the total number of rows available
232
- * is more than the value specified, a NextToken is provided in the command's output.
233
- * To resume pagination, provide the NextToken value in the starting-token argument of a
234
- * subsequent command.
235
- * </p>
1033
+ * <p> The total number of rows to be returned in the <code>Query</code> output. The initial
1034
+ * run of <code>Query</code> with a <code>MaxRows</code> value specified will return the
1035
+ * result set of the query in two cases: </p>
1036
+ * <ul>
1037
+ * <li>
1038
+ * <p>The size of the result is less than <code>1MB</code>.</p>
1039
+ * </li>
1040
+ * <li>
1041
+ * <p>The number of rows in the result set is less than the value of
1042
+ * <code>maxRows</code>.</p>
1043
+ * </li>
1044
+ * </ul>
1045
+ * <p>Otherwise, the initial invocation of <code>Query</code> only returns a
1046
+ * <code>NextToken</code>, which can then be used in subsequent calls to fetch the
1047
+ * result set. To resume pagination, provide the <code>NextToken</code> value in the
1048
+ * subsequent command.</p>
1049
+ * <p>If the row size is large (e.g. a row has many columns), Timestream may return
1050
+ * fewer rows to keep the response size from exceeding the 1 MB limit. If
1051
+ * <code>MaxRows</code> is not provided, Timestream will send the necessary
1052
+ * number of rows to meet the 1 MB limit.</p>
236
1053
  */
237
1054
  MaxRows?: number;
238
1055
  }
@@ -243,7 +1060,8 @@ export declare namespace QueryRequest {
243
1060
  const filterSensitiveLog: (obj: QueryRequest) => any;
244
1061
  }
245
1062
  /**
246
- * <p>Information about the status of the query, including progress and bytes scannned.</p>
1063
+ * <p>Information about the status of the query, including progress and bytes
1064
+ * scanned.</p>
247
1065
  */
248
1066
  export interface QueryStatus {
249
1067
  /**
@@ -251,18 +1069,15 @@ export interface QueryStatus {
251
1069
  */
252
1070
  ProgressPercentage?: number;
253
1071
  /**
254
- * <p>The amount of data scanned by the query in bytes.
255
- * This is a cumulative sum and represents the total amount of bytes scanned since the query was started.
256
- * </p>
1072
+ * <p>The amount of data scanned by the query in bytes. This is a cumulative sum and
1073
+ * represents the total amount of bytes scanned since the query was started. </p>
257
1074
  */
258
1075
  CumulativeBytesScanned?: number;
259
1076
  /**
260
- * <p>The amount of data scanned by the query in bytes that you will be charged for.
261
- * This is a cumulative sum and represents the total amount of data that you will be charged
262
- * for since the query was started.
263
- * The charge is applied only once and is either applied when
264
- * the query completes execution or when the query is cancelled.
265
- * </p>
1077
+ * <p>The amount of data scanned by the query in bytes that you will be charged for. This is
1078
+ * a cumulative sum and represents the total amount of data that you will be charged for
1079
+ * since the query was started. The charge is applied only once and is either applied when
1080
+ * the query completes running or when the query is cancelled. </p>
266
1081
  */
267
1082
  CumulativeBytesMetered?: number;
268
1083
  }
@@ -272,22 +1087,87 @@ export declare namespace QueryStatus {
272
1087
  */
273
1088
  const filterSensitiveLog: (obj: QueryStatus) => any;
274
1089
  }
1090
+ export interface TagResourceRequest {
1091
+ /**
1092
+ * <p>Identifies the Timestream resource to which tags should be added. This value is an
1093
+ * Amazon Resource Name (ARN).</p>
1094
+ */
1095
+ ResourceARN: string | undefined;
1096
+ /**
1097
+ * <p>The tags to be assigned to the Timestream resource.</p>
1098
+ */
1099
+ Tags: Tag[] | undefined;
1100
+ }
1101
+ export declare namespace TagResourceRequest {
1102
+ /**
1103
+ * @internal
1104
+ */
1105
+ const filterSensitiveLog: (obj: TagResourceRequest) => any;
1106
+ }
1107
+ export interface TagResourceResponse {
1108
+ }
1109
+ export declare namespace TagResourceResponse {
1110
+ /**
1111
+ * @internal
1112
+ */
1113
+ const filterSensitiveLog: (obj: TagResourceResponse) => any;
1114
+ }
1115
+ export interface UntagResourceRequest {
1116
+ /**
1117
+ * <p>The Timestream resource that the tags will be removed from. This value is an Amazon
1118
+ * Resource Name (ARN). </p>
1119
+ */
1120
+ ResourceARN: string | undefined;
1121
+ /**
1122
+ * <p>A list of tags keys. Existing tags of the resource whose keys are members of this list
1123
+ * will be removed from the Timestream resource. </p>
1124
+ */
1125
+ TagKeys: string[] | undefined;
1126
+ }
1127
+ export declare namespace UntagResourceRequest {
1128
+ /**
1129
+ * @internal
1130
+ */
1131
+ const filterSensitiveLog: (obj: UntagResourceRequest) => any;
1132
+ }
1133
+ export interface UntagResourceResponse {
1134
+ }
1135
+ export declare namespace UntagResourceResponse {
1136
+ /**
1137
+ * @internal
1138
+ */
1139
+ const filterSensitiveLog: (obj: UntagResourceResponse) => any;
1140
+ }
1141
+ export interface UpdateScheduledQueryRequest {
1142
+ /**
1143
+ * <p>ARN of the scheuled query.</p>
1144
+ */
1145
+ ScheduledQueryArn: string | undefined;
1146
+ /**
1147
+ * <p>State of the scheduled query. </p>
1148
+ */
1149
+ State: ScheduledQueryState | string | undefined;
1150
+ }
1151
+ export declare namespace UpdateScheduledQueryRequest {
1152
+ /**
1153
+ * @internal
1154
+ */
1155
+ const filterSensitiveLog: (obj: UpdateScheduledQueryRequest) => any;
1156
+ }
275
1157
  /**
276
- * <p>
277
- * Contains the meta data for query results such as the column names, data types, and other attributes.
278
- * </p>
1158
+ * <p> Contains the metadata for query results such as the column names, data types, and
1159
+ * other attributes. </p>
279
1160
  */
280
1161
  export interface ColumnInfo {
281
1162
  /**
282
- * <p>
283
- * The name of the result set column. The name of the result set is available for columns of all data types except for arrays.
284
- * </p>
1163
+ * <p> The name of the result set column. The name of the result set is available for
1164
+ * columns of all data types except for arrays. </p>
285
1165
  */
286
1166
  Name?: string;
287
1167
  /**
288
- * <p>
289
- * The data type of the result set column. The data type can be a scalar or complex. Scalar data types are integers, strings, doubles, booleans, and others. Complex data types are types such as arrays, rows, and others.
290
- * </p>
1168
+ * <p>The data type of the result set column. The data type can be a scalar or complex.
1169
+ * Scalar data types are integers, strings, doubles, Booleans, and others. Complex data
1170
+ * types are types such as arrays, rows, and others. </p>
291
1171
  */
292
1172
  Type: Type | undefined;
293
1173
  }
@@ -298,11 +1178,15 @@ export declare namespace ColumnInfo {
298
1178
  const filterSensitiveLog: (obj: ColumnInfo) => any;
299
1179
  }
300
1180
  /**
301
- * <p>Contains the data type of a column in a query result set. The data type can be scalar or complex. The supported scalar data types are integers, boolean, string, double, timestamp, date, time, and intervals. The supported complex data types are arrays, rows, and timeseries.</p>
1181
+ * <p>Contains the data type of a column in a query result set. The data type can be scalar
1182
+ * or complex. The supported scalar data types are integers, Boolean, string, double,
1183
+ * timestamp, date, time, and intervals. The supported complex data types are arrays, rows,
1184
+ * and timeseries.</p>
302
1185
  */
303
1186
  export interface Type {
304
1187
  /**
305
- * <p>Indicates if the column is of type string, integer, boolean, double, timestamp, date, time. </p>
1188
+ * <p>Indicates if the column is of type string, integer, Boolean, double, timestamp, date,
1189
+ * time. </p>
306
1190
  */
307
1191
  ScalarType?: ScalarType | string;
308
1192
  /**
@@ -325,39 +1209,28 @@ export declare namespace Type {
325
1209
  const filterSensitiveLog: (obj: Type) => any;
326
1210
  }
327
1211
  /**
328
- * <p>
329
- * Datum represents a single data point in a query result.
330
- * </p>
1212
+ * <p> Datum represents a single data point in a query result. </p>
331
1213
  */
332
1214
  export interface Datum {
333
1215
  /**
334
- * <p>
335
- * Indicates if the data point is a scalar value such as integer, string, double, or boolean.
336
- * </p>
1216
+ * <p> Indicates if the data point is a scalar value such as integer, string, double, or
1217
+ * Boolean. </p>
337
1218
  */
338
1219
  ScalarValue?: string;
339
1220
  /**
340
- * <p>
341
- * Indicates if the data point is of timeseries data type.
342
- * </p>
1221
+ * <p> Indicates if the data point is a timeseries data type. </p>
343
1222
  */
344
1223
  TimeSeriesValue?: TimeSeriesDataPoint[];
345
1224
  /**
346
- * <p>
347
- * Indicates if the data point is an array.
348
- * </p>
1225
+ * <p> Indicates if the data point is an array. </p>
349
1226
  */
350
1227
  ArrayValue?: Datum[];
351
1228
  /**
352
- * <p>
353
- * Indicates if the data point is a row.
354
- * </p>
1229
+ * <p> Indicates if the data point is a row. </p>
355
1230
  */
356
1231
  RowValue?: Row;
357
1232
  /**
358
- * <p>
359
- * Indicates if the data point is null.
360
- * </p>
1233
+ * <p> Indicates if the data point is null. </p>
361
1234
  */
362
1235
  NullValue?: boolean;
363
1236
  }
@@ -368,7 +1241,66 @@ export declare namespace Datum {
368
1241
  const filterSensitiveLog: (obj: Datum) => any;
369
1242
  }
370
1243
  /**
371
- * <p>The timeseries datatype represents the values of a measure over time. A time series is an array of rows of timestamps and measure values, with rows sorted in ascending order of time. A TimeSeriesDataPoint is a single data point in the timeseries. It represents a tuple of (time, measure value) in a timeseries. </p>
1244
+ * <p>Mapping for named parameters.</p>
1245
+ */
1246
+ export interface ParameterMapping {
1247
+ /**
1248
+ * <p>Parameter name.</p>
1249
+ */
1250
+ Name: string | undefined;
1251
+ /**
1252
+ * <p>Contains the data type of a column in a query result set. The data type can be scalar
1253
+ * or complex. The supported scalar data types are integers, Boolean, string, double,
1254
+ * timestamp, date, time, and intervals. The supported complex data types are arrays, rows,
1255
+ * and timeseries.</p>
1256
+ */
1257
+ Type: Type | undefined;
1258
+ }
1259
+ export declare namespace ParameterMapping {
1260
+ /**
1261
+ * @internal
1262
+ */
1263
+ const filterSensitiveLog: (obj: ParameterMapping) => any;
1264
+ }
1265
+ /**
1266
+ * <p>Details of the column that is returned by the query. </p>
1267
+ */
1268
+ export interface SelectColumn {
1269
+ /**
1270
+ * <p>Name of the column.</p>
1271
+ */
1272
+ Name?: string;
1273
+ /**
1274
+ * <p>Contains the data type of a column in a query result set. The data type can be scalar
1275
+ * or complex. The supported scalar data types are integers, Boolean, string, double,
1276
+ * timestamp, date, time, and intervals. The supported complex data types are arrays, rows,
1277
+ * and timeseries.</p>
1278
+ */
1279
+ Type?: Type;
1280
+ /**
1281
+ * <p> Database that has this column.</p>
1282
+ */
1283
+ DatabaseName?: string;
1284
+ /**
1285
+ * <p>Table within the database that has this column. </p>
1286
+ */
1287
+ TableName?: string;
1288
+ /**
1289
+ * <p>True, if the column name was aliased by the query. False otherwise.</p>
1290
+ */
1291
+ Aliased?: boolean;
1292
+ }
1293
+ export declare namespace SelectColumn {
1294
+ /**
1295
+ * @internal
1296
+ */
1297
+ const filterSensitiveLog: (obj: SelectColumn) => any;
1298
+ }
1299
+ /**
1300
+ * <p>The timeseries data type represents the values of a measure over time. A time series
1301
+ * is an array of rows of timestamps and measure values, with rows sorted in ascending
1302
+ * order of time. A TimeSeriesDataPoint is a single data point in the time series. It
1303
+ * represents a tuple of (time, measure value) in a time series. </p>
372
1304
  */
373
1305
  export interface TimeSeriesDataPoint {
374
1306
  /**
@@ -376,7 +1308,7 @@ export interface TimeSeriesDataPoint {
376
1308
  */
377
1309
  Time: string | undefined;
378
1310
  /**
379
- * <p>The measure value for the data point.</p>
1311
+ * <p>The measure value for the data point.</p>
380
1312
  */
381
1313
  Value: Datum | undefined;
382
1314
  }
@@ -403,31 +1335,25 @@ export declare namespace Row {
403
1335
  }
404
1336
  export interface QueryResponse {
405
1337
  /**
406
- * <p>
407
- * A unique ID for the given query.
408
- * </p>
1338
+ * <p> A unique ID for the given query. </p>
409
1339
  */
410
1340
  QueryId: string | undefined;
411
1341
  /**
412
- * <p>
413
- * A pagination token that can be used again on a <code>Query</code> call to get the next set of results.
414
- * </p>
1342
+ * <p> A pagination token that can be used again on a <code>Query</code> call to get the
1343
+ * next set of results. </p>
415
1344
  */
416
1345
  NextToken?: string;
417
1346
  /**
418
- * <p>
419
- * The result set rows returned by the query.
420
- * </p>
1347
+ * <p> The result set rows returned by the query. </p>
421
1348
  */
422
1349
  Rows: Row[] | undefined;
423
1350
  /**
424
- * <p>
425
- * The column data types of the returned result set.
426
- * </p>
1351
+ * <p> The column data types of the returned result set. </p>
427
1352
  */
428
1353
  ColumnInfo: ColumnInfo[] | undefined;
429
1354
  /**
430
- * <p>Information about the status of the query, including progress and bytes scannned.</p>
1355
+ * <p>Information about the status of the query, including progress and bytes
1356
+ * scanned.</p>
431
1357
  */
432
1358
  QueryStatus?: QueryStatus;
433
1359
  }
@@ -437,3 +1363,23 @@ export declare namespace QueryResponse {
437
1363
  */
438
1364
  const filterSensitiveLog: (obj: QueryResponse) => any;
439
1365
  }
1366
+ export interface PrepareQueryResponse {
1367
+ /**
1368
+ * <p>The query string that you want prepare.</p>
1369
+ */
1370
+ QueryString: string | undefined;
1371
+ /**
1372
+ * <p>A list of SELECT clause columns of the submitted query string. </p>
1373
+ */
1374
+ Columns: SelectColumn[] | undefined;
1375
+ /**
1376
+ * <p>A list of parameters used in the submitted query string. </p>
1377
+ */
1378
+ Parameters: ParameterMapping[] | undefined;
1379
+ }
1380
+ export declare namespace PrepareQueryResponse {
1381
+ /**
1382
+ * @internal
1383
+ */
1384
+ const filterSensitiveLog: (obj: PrepareQueryResponse) => any;
1385
+ }