/
models_0.ts
1720 lines (1503 loc) · 46 KB
/
models_0.ts
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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// smithy-typescript generated code
import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@aws-sdk/smithy-client";
import { TimestreamQueryServiceException as __BaseException } from "./TimestreamQueryServiceException";
/**
* <p> You are not authorized to perform this action. </p>
*/
export class AccessDeniedException extends __BaseException {
readonly name: "AccessDeniedException" = "AccessDeniedException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, AccessDeniedException.prototype);
this.Message = opts.Message;
}
}
export interface CancelQueryRequest {
/**
* <p> The ID of the query that needs to be cancelled. <code>QueryID</code> is returned as
* part of the query result. </p>
*/
QueryId: string | undefined;
}
export interface CancelQueryResponse {
/**
* <p> A <code>CancellationMessage</code> is returned when a <code>CancelQuery</code>
* request for the query specified by <code>QueryId</code> has already been issued. </p>
*/
CancellationMessage?: string;
}
/**
* <p>
* Timestream was unable to fully process this request because of an internal
* server error. </p>
*/
export class InternalServerException extends __BaseException {
readonly name: "InternalServerException" = "InternalServerException";
readonly $fault: "server" = "server";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>) {
super({
name: "InternalServerException",
$fault: "server",
...opts,
});
Object.setPrototypeOf(this, InternalServerException.prototype);
this.Message = opts.Message;
}
}
/**
* <p>The requested endpoint was not valid.</p>
*/
export class InvalidEndpointException extends __BaseException {
readonly name: "InvalidEndpointException" = "InvalidEndpointException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InvalidEndpointException, __BaseException>) {
super({
name: "InvalidEndpointException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, InvalidEndpointException.prototype);
this.Message = opts.Message;
}
}
/**
* <p>The request was denied due to request throttling.</p>
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
super({
name: "ThrottlingException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
this.Message = opts.Message;
}
}
/**
* <p> Invalid or malformed request. </p>
*/
export class ValidationException extends __BaseException {
readonly name: "ValidationException" = "ValidationException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>) {
super({
name: "ValidationException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ValidationException.prototype);
this.Message = opts.Message;
}
}
export enum ScalarType {
BIGINT = "BIGINT",
BOOLEAN = "BOOLEAN",
DATE = "DATE",
DOUBLE = "DOUBLE",
INTEGER = "INTEGER",
INTERVAL_DAY_TO_SECOND = "INTERVAL_DAY_TO_SECOND",
INTERVAL_YEAR_TO_MONTH = "INTERVAL_YEAR_TO_MONTH",
TIME = "TIME",
TIMESTAMP = "TIMESTAMP",
UNKNOWN = "UNKNOWN",
VARCHAR = "VARCHAR",
}
/**
* <p> Unable to poll results for a cancelled query. </p>
*/
export class ConflictException extends __BaseException {
readonly name: "ConflictException" = "ConflictException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>) {
super({
name: "ConflictException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ConflictException.prototype);
this.Message = opts.Message;
}
}
export enum S3EncryptionOption {
SSE_KMS = "SSE_KMS",
SSE_S3 = "SSE_S3",
}
/**
* <p>Details on S3 location for error reports that result from running a query. </p>
*/
export interface S3Configuration {
/**
* <p> Name of the S3 bucket under which error reports will be created.</p>
*/
BucketName: string | undefined;
/**
* <p> Prefix for the error report key. Timestream by default adds the following prefix to
* the error report path. </p>
*/
ObjectKeyPrefix?: string;
/**
* <p> Encryption at rest options for the error reports. If no encryption option is
* specified, Timestream will choose SSE_S3 as default. </p>
*/
EncryptionOption?: S3EncryptionOption | string;
}
/**
* <p>Configuration required for error reporting.</p>
*/
export interface ErrorReportConfiguration {
/**
* <p>The S3 configuration for the error reports.</p>
*/
S3Configuration: S3Configuration | undefined;
}
/**
* <p>Details on SNS that are required to send the notification.</p>
*/
export interface SnsConfiguration {
/**
* <p>SNS topic ARN that the scheduled query status notifications will be sent to.</p>
*/
TopicArn: string | undefined;
}
/**
* <p>Notification configuration for a scheduled query. A notification is sent by
* Timestream when a scheduled query is created, its state is updated or when it is deleted. </p>
*/
export interface NotificationConfiguration {
/**
* <p>Details on SNS configuration. </p>
*/
SnsConfiguration: SnsConfiguration | undefined;
}
/**
* <p>Configuration of the schedule of the query.</p>
*/
export interface ScheduleConfiguration {
/**
* <p>An expression that denotes when to trigger the scheduled query run. This can be a cron
* expression or a rate expression. </p>
*/
ScheduleExpression: string | undefined;
}
/**
* <p>A tag is a label that you assign to a Timestream database and/or table. Each tag
* consists of a key and an optional value, both of which you define. Tags enable you to
* categorize databases and/or tables, for example, by purpose, owner, or environment.
* </p>
*/
export interface Tag {
/**
* <p>The key of the tag. Tag keys are case sensitive. </p>
*/
Key: string | undefined;
/**
* <p>The value of the tag. Tag values are case sensitive and can be null. </p>
*/
Value: string | undefined;
}
export enum DimensionValueType {
VARCHAR = "VARCHAR",
}
/**
* <p>This type is used to map column(s) from the query result to a dimension in the
* destination table.</p>
*/
export interface DimensionMapping {
/**
* <p>Column name from query result.</p>
*/
Name: string | undefined;
/**
* <p>Type for the dimension. </p>
*/
DimensionValueType: DimensionValueType | string | undefined;
}
export enum MeasureValueType {
BIGINT = "BIGINT",
BOOLEAN = "BOOLEAN",
DOUBLE = "DOUBLE",
MULTI = "MULTI",
VARCHAR = "VARCHAR",
}
export enum ScalarMeasureValueType {
BIGINT = "BIGINT",
BOOLEAN = "BOOLEAN",
DOUBLE = "DOUBLE",
TIMESTAMP = "TIMESTAMP",
VARCHAR = "VARCHAR",
}
/**
* <p>Attribute mapping for MULTI value measures.</p>
*/
export interface MultiMeasureAttributeMapping {
/**
* <p>Source column from where the attribute value is to be read.</p>
*/
SourceColumn: string | undefined;
/**
* <p>Custom name to be used for attribute name in derived table. If not provided, source
* column name would be used.</p>
*/
TargetMultiMeasureAttributeName?: string;
/**
* <p>Type of the attribute to be read from the source column.</p>
*/
MeasureValueType: ScalarMeasureValueType | string | undefined;
}
/**
* <p>MixedMeasureMappings are mappings that can be used to ingest data into a mixture of
* narrow and multi measures in the derived table.</p>
*/
export interface MixedMeasureMapping {
/**
* <p>Refers to the value of measure_name in a result row. This field is required if
* MeasureNameColumn is provided.</p>
*/
MeasureName?: string;
/**
* <p>This field refers to the source column from which measure-value is to be read for
* result materialization.</p>
*/
SourceColumn?: string;
/**
* <p>Target measure name to be used. If not provided, the target measure name by default
* would be measure-name if provided, or sourceColumn otherwise. </p>
*/
TargetMeasureName?: string;
/**
* <p>Type of the value that is to be read from sourceColumn. If the mapping is for MULTI,
* use MeasureValueType.MULTI.</p>
*/
MeasureValueType: MeasureValueType | string | undefined;
/**
* <p>Required when measureValueType is MULTI. Attribute mappings for MULTI value
* measures.</p>
*/
MultiMeasureAttributeMappings?: MultiMeasureAttributeMapping[];
}
/**
* <p>Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided.
* MultiMeasureMappings can be used to ingest data as multi measures in the derived
* table.</p>
*/
export interface MultiMeasureMappings {
/**
* <p>The name of the target multi-measure name in the derived table. This input is required
* when measureNameColumn is not provided. If MeasureNameColumn is provided, then value
* from that column will be used as multi-measure name.</p>
*/
TargetMultiMeasureName?: string;
/**
* <p>Required. Attribute mappings to be used for mapping query results to ingest data for
* multi-measure attributes.</p>
*/
MultiMeasureAttributeMappings: MultiMeasureAttributeMapping[] | undefined;
}
/**
* <p> Configuration to write data into Timestream database and table. This configuration
* allows the user to map the query result select columns into the destination table
* columns. </p>
*/
export interface TimestreamConfiguration {
/**
* <p>Name of Timestream database to which the query result will be written.</p>
*/
DatabaseName: string | undefined;
/**
* <p>Name of Timestream table that the query result will be written to. The table should
* be within the same database that is provided in Timestream configuration.</p>
*/
TableName: string | undefined;
/**
* <p>Column from query result that should be used as the time column in destination table.
* Column type for this should be TIMESTAMP.</p>
*/
TimeColumn: string | undefined;
/**
* <p> This is to allow mapping column(s) from the query result to the dimension in the
* destination table. </p>
*/
DimensionMappings: DimensionMapping[] | undefined;
/**
* <p>Multi-measure mappings.</p>
*/
MultiMeasureMappings?: MultiMeasureMappings;
/**
* <p>Specifies how to map measures to multi-measure records.</p>
*/
MixedMeasureMappings?: MixedMeasureMapping[];
/**
* <p>Name of the measure column.</p>
*/
MeasureNameColumn?: string;
}
/**
* <p>Configuration used for writing the output of a query.</p>
*/
export interface TargetConfiguration {
/**
* <p>Configuration needed to write data into the Timestream database and table.</p>
*/
TimestreamConfiguration: TimestreamConfiguration | undefined;
}
export interface CreateScheduledQueryRequest {
/**
* <p>Name of the scheduled query.</p>
*/
Name: string | undefined;
/**
* <p>The query string to run. Parameter
* names can be specified in the query string <code>@</code> character followed by an
* 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>
* <p>The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of <code>@scheduled_runtime</code> paramater for each query run.
* 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
* initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.</p>
*/
QueryString: string | undefined;
/**
* <p>The schedule configuration for the query.</p>
*/
ScheduleConfiguration: ScheduleConfiguration | undefined;
/**
* <p>Notification configuration for the scheduled query. A notification is sent by
* Timestream when a query run finishes, when the state is updated or when you delete it. </p>
*/
NotificationConfiguration: NotificationConfiguration | undefined;
/**
* <p>Configuration used for writing the result of a query.</p>
*/
TargetConfiguration?: TargetConfiguration;
/**
* <p>Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making
* multiple identical CreateScheduledQuery requests has the same effect as making a single request.
*
* </p>
* <ul>
* <li>
* <p> If CreateScheduledQuery is called without a <code>ClientToken</code>, the
* Query SDK generates a <code>ClientToken</code> on your behalf.</p>
* </li>
* <li>
* <p> After 8 hours, any request with the same <code>ClientToken</code> is treated
* as a new request. </p>
* </li>
* </ul>
*/
ClientToken?: string;
/**
* <p>The ARN for the IAM role that Timestream will assume when running the scheduled query. </p>
*/
ScheduledQueryExecutionRoleArn: string | undefined;
/**
* <p>A list of key-value pairs to label the scheduled query.</p>
*/
Tags?: Tag[];
/**
* <p>The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS
* key is not specified, the scheduled query resource will be encrypted with a Timestream
* owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias
* ARN. When using an alias name, prefix the name with <i>alias/</i>
* </p>
* <p>If ErrorReportConfiguration uses <code>SSE_KMS</code> as encryption type, the same KmsKeyId is used to encrypt the error report at rest.</p>
*/
KmsKeyId?: string;
/**
* <p>Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results. </p>
*/
ErrorReportConfiguration: ErrorReportConfiguration | undefined;
}
export interface CreateScheduledQueryResponse {
/**
* <p>ARN for the created scheduled query.</p>
*/
Arn: string | undefined;
}
/**
* <p>You have exceeded the service quota.</p>
*/
export class ServiceQuotaExceededException extends __BaseException {
readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>) {
super({
name: "ServiceQuotaExceededException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
this.Message = opts.Message;
}
}
export interface DeleteScheduledQueryRequest {
/**
* <p>The ARN of the scheduled query. </p>
*/
ScheduledQueryArn: string | undefined;
}
/**
* <p>The requested resource could not be found.</p>
*/
export class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
readonly $fault: "client" = "client";
Message?: string;
/**
* <p>The ARN of the scheduled query.</p>
*/
ScheduledQueryArn?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
this.Message = opts.Message;
this.ScheduledQueryArn = opts.ScheduledQueryArn;
}
}
export interface DescribeEndpointsRequest {}
/**
* <p>Represents an available endpoint against which to make API calls against, as well as
* the TTL for that endpoint.</p>
*/
export interface Endpoint {
/**
* <p>An endpoint address.</p>
*/
Address: string | undefined;
/**
* <p>The TTL for the endpoint, in minutes.</p>
*/
CachePeriodInMinutes: number | undefined;
}
export interface DescribeEndpointsResponse {
/**
* <p>An <code>Endpoints</code> object is returned when a <code>DescribeEndpoints</code>
* request is made.</p>
*/
Endpoints: Endpoint[] | undefined;
}
export interface DescribeScheduledQueryRequest {
/**
* <p>The ARN of the scheduled query.</p>
*/
ScheduledQueryArn: string | undefined;
}
/**
* <p> S3 report location for the scheduled query run.</p>
*/
export interface S3ReportLocation {
/**
* <p> S3 bucket name. </p>
*/
BucketName?: string;
/**
* <p>S3 key. </p>
*/
ObjectKey?: string;
}
/**
* <p>This contains the location of the error report for a single scheduled query call.
* </p>
*/
export interface ErrorReportLocation {
/**
* <p>The S3 location where error reports are written.</p>
*/
S3ReportLocation?: S3ReportLocation;
}
/**
* <p>Statistics for a single scheduled query run.</p>
*/
export interface ExecutionStats {
/**
* <p>Total time, measured in milliseconds, that was needed for the scheduled query run to complete.</p>
*/
ExecutionTimeInMillis?: number;
/**
* <p>Data writes metered for records ingested in a single scheduled query run.</p>
*/
DataWrites?: number;
/**
* <p>Bytes metered for a single scheduled query run.</p>
*/
BytesMetered?: number;
/**
* <p>The number of records ingested for a single scheduled query run. </p>
*/
RecordsIngested?: number;
/**
* <p>Number of rows present in the output from running a query before ingestion to
* destination data source.</p>
*/
QueryResultRows?: number;
}
export enum ScheduledQueryRunStatus {
AUTO_TRIGGER_FAILURE = "AUTO_TRIGGER_FAILURE",
AUTO_TRIGGER_SUCCESS = "AUTO_TRIGGER_SUCCESS",
MANUAL_TRIGGER_FAILURE = "MANUAL_TRIGGER_FAILURE",
MANUAL_TRIGGER_SUCCESS = "MANUAL_TRIGGER_SUCCESS",
}
/**
* <p>Run summary for the scheduled query</p>
*/
export interface ScheduledQueryRunSummary {
/**
* <p>InvocationTime for this run. This is the time at which the query is scheduled to run.
* Parameter <code>@scheduled_runtime</code> can be used in the query to get the value. </p>
*/
InvocationTime?: Date;
/**
* <p>The actual time when the query was run.</p>
*/
TriggerTime?: Date;
/**
* <p>The status of a scheduled query run.</p>
*/
RunStatus?: ScheduledQueryRunStatus | string;
/**
* <p>Runtime statistics for a scheduled run.</p>
*/
ExecutionStats?: ExecutionStats;
/**
* <p>S3 location for error report.</p>
*/
ErrorReportLocation?: ErrorReportLocation;
/**
* <p>Error message for the scheduled query in case of failure. You might have to look at
* the error report to get more detailed error reasons. </p>
*/
FailureReason?: string;
}
export enum ScheduledQueryState {
DISABLED = "DISABLED",
ENABLED = "ENABLED",
}
/**
* <p>Structure that describes scheduled query.</p>
*/
export interface ScheduledQueryDescription {
/**
* <p>Scheduled query ARN.</p>
*/
Arn: string | undefined;
/**
* <p>Name of the scheduled query.</p>
*/
Name: string | undefined;
/**
* <p>The query to be run.</p>
*/
QueryString: string | undefined;
/**
* <p>Creation time of the scheduled query.</p>
*/
CreationTime?: Date;
/**
* <p>State of the scheduled query. </p>
*/
State: ScheduledQueryState | string | undefined;
/**
* <p>Last time the query was run.</p>
*/
PreviousInvocationTime?: Date;
/**
* <p>The next time the scheduled query is scheduled to run.</p>
*/
NextInvocationTime?: Date;
/**
* <p>Schedule configuration.</p>
*/
ScheduleConfiguration: ScheduleConfiguration | undefined;
/**
* <p>Notification configuration.</p>
*/
NotificationConfiguration: NotificationConfiguration | undefined;
/**
* <p>Scheduled query target store configuration.</p>
*/
TargetConfiguration?: TargetConfiguration;
/**
* <p>IAM role that Timestream uses to run the schedule query.</p>
*/
ScheduledQueryExecutionRoleArn?: string;
/**
* <p>A customer provided KMS key used to encrypt the scheduled query resource.</p>
*/
KmsKeyId?: string;
/**
* <p>Error-reporting configuration for the scheduled query.</p>
*/
ErrorReportConfiguration?: ErrorReportConfiguration;
/**
* <p>Runtime summary for the last scheduled query run. </p>
*/
LastRunSummary?: ScheduledQueryRunSummary;
/**
* <p>Runtime summary for the last five failed scheduled query runs.</p>
*/
RecentlyFailedRuns?: ScheduledQueryRunSummary[];
}
export interface DescribeScheduledQueryResponse {
/**
* <p>The scheduled query.</p>
*/
ScheduledQuery: ScheduledQueryDescription | undefined;
}
export interface ExecuteScheduledQueryRequest {
/**
* <p>ARN of the scheduled query.</p>
*/
ScheduledQueryArn: string | undefined;
/**
* <p>The timestamp in UTC. Query will be run as if it was invoked at this timestamp. </p>
*/
InvocationTime: Date | undefined;
/**
* <p>Not used. </p>
*/
ClientToken?: string;
}
export interface ListScheduledQueriesRequest {
/**
* <p>The maximum number of items to return in the output. If the total number of items
* available is more than the value specified, a <code>NextToken</code> is provided in the
* output. To resume pagination, provide the <code>NextToken</code> value as the argument
* to the subsequent call to <code>ListScheduledQueriesRequest</code>.</p>
*/
MaxResults?: number;
/**
* <p> A pagination token to resume pagination.</p>
*/
NextToken?: string;
}
/**
* <p>Destination for scheduled query.</p>
*/
export interface TimestreamDestination {
/**
* <p>Timestream database name. </p>
*/
DatabaseName?: string;
/**
* <p>Timestream table name. </p>
*/
TableName?: string;
}
/**
* <p>Destination details to write data for a target data source. Current supported data
* source is Timestream.</p>
*/
export interface TargetDestination {
/**
* <p>Query result destination details for Timestream data source.</p>
*/
TimestreamDestination?: TimestreamDestination;
}
/**
* <p>Scheduled Query</p>
*/
export interface ScheduledQuery {
/**
* <p>The Amazon Resource Name.</p>
*/
Arn: string | undefined;
/**
* <p>The name of the scheduled query.</p>
*/
Name: string | undefined;
/**
* <p>The creation time of the scheduled query.</p>
*/
CreationTime?: Date;
/**
* <p>State of scheduled query. </p>
*/
State: ScheduledQueryState | string | undefined;
/**
* <p>The last time the scheduled query was run.</p>
*/
PreviousInvocationTime?: Date;
/**
* <p>The next time the scheduled query is to be run.</p>
*/
NextInvocationTime?: Date;
/**
* <p>Configuration for scheduled query error reporting.</p>
*/
ErrorReportConfiguration?: ErrorReportConfiguration;
/**
* <p>Target data source where final scheduled query result will be written.</p>
*/
TargetDestination?: TargetDestination;
/**
* <p>Status of the last scheduled query run.</p>
*/
LastRunStatus?: ScheduledQueryRunStatus | string;
}
export interface ListScheduledQueriesResponse {
/**
* <p>A list of scheduled queries.</p>
*/
ScheduledQueries: ScheduledQuery[] | undefined;
/**
* <p>A token to specify where to start paginating. This is the NextToken from a previously
* truncated response.</p>
*/
NextToken?: string;
}
export interface ListTagsForResourceRequest {
/**
* <p>The Timestream resource with tags to be listed. This value is an Amazon Resource Name
* (ARN).</p>
*/
ResourceARN: string | undefined;
/**
* <p>The maximum number of tags to return.</p>
*/
MaxResults?: number;
/**
* <p>A pagination token to resume pagination.</p>
*/
NextToken?: string;
}
export interface ListTagsForResourceResponse {
/**
* <p>The tags currently associated with the Timestream resource. </p>
*/
Tags: Tag[] | undefined;
/**
* <p>A pagination token to resume pagination with a subsequent call to
* <code>ListTagsForResourceResponse</code>.</p>
*/
NextToken?: string;
}
export interface PrepareQueryRequest {
/**
* <p>The Timestream query string that you want to use as a prepared statement. Parameter
* names can be specified in the query string <code>@</code> character followed by an
* identifier. </p>
*/
QueryString: string | undefined;
/**
* <p>By setting this value to <code>true</code>, Timestream will only validate that the
* query string is a valid Timestream query, and not store the prepared query for later
* use.</p>
*/
ValidateOnly?: boolean;
}
/**
* <p>
* Timestream was unable to run the query successfully. </p>
*/
export class QueryExecutionException extends __BaseException {
readonly name: "QueryExecutionException" = "QueryExecutionException";
readonly $fault: "client" = "client";
Message?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<QueryExecutionException, __BaseException>) {
super({
name: "QueryExecutionException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, QueryExecutionException.prototype);
this.Message = opts.Message;
}
}
export interface QueryRequest {
/**
* <p> The query to be run by Timestream. </p>
*/
QueryString: string | undefined;
/**
* <p> Unique, case-sensitive string of up to 64 ASCII characters specified when a
* <code>Query</code> request is made. Providing a <code>ClientToken</code> makes the
* call to <code>Query</code>
* <i>idempotent</i>. This means that running the same query repeatedly will
* produce the same result. In other words, making multiple identical <code>Query</code>
* requests has the same effect as making a single request. When using
* <code>ClientToken</code> in a query, note the following: </p>
* <ul>
* <li>
* <p> If the Query API is instantiated without a <code>ClientToken</code>, the
* Query SDK generates a <code>ClientToken</code> on your behalf.</p>
* </li>
* <li>
* <p>If the <code>Query</code> invocation only contains the
* <code>ClientToken</code> but does not include a <code>NextToken</code>, that
* invocation of <code>Query</code> is assumed to be a new query run.</p>
* </li>
* <li>
* <p>If the invocation contains <code>NextToken</code>, that particular invocation
* is assumed to be a subsequent invocation of a prior call to the Query API, and a
* result set is returned.</p>
* </li>