@aws-sdk/client-redshift-data 3.1092.0 → 3.1094.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 (36) hide show
  1. package/README.md +7 -0
  2. package/dist-cjs/index.js +109 -30
  3. package/dist-es/RedshiftData.js +4 -0
  4. package/dist-es/commands/ListSessionsCommand.js +4 -0
  5. package/dist-es/commands/index.js +1 -0
  6. package/dist-es/models/enums.js +12 -3
  7. package/dist-es/models/errors.js +14 -0
  8. package/dist-es/pagination/ListSessionsPaginator.js +4 -0
  9. package/dist-es/pagination/index.js +1 -0
  10. package/dist-es/schemas/schemas_0.js +66 -27
  11. package/dist-types/RedshiftData.d.ts +15 -0
  12. package/dist-types/RedshiftDataClient.d.ts +3 -2
  13. package/dist-types/commands/BatchExecuteStatementCommand.d.ts +5 -0
  14. package/dist-types/commands/DescribeStatementCommand.d.ts +5 -0
  15. package/dist-types/commands/ExecuteStatementCommand.d.ts +4 -0
  16. package/dist-types/commands/GetStatementResultCommand.d.ts +4 -0
  17. package/dist-types/commands/GetStatementResultV2Command.d.ts +4 -0
  18. package/dist-types/commands/ListSessionsCommand.d.ts +102 -0
  19. package/dist-types/commands/index.d.ts +1 -0
  20. package/dist-types/models/enums.d.ts +30 -5
  21. package/dist-types/models/errors.d.ts +13 -0
  22. package/dist-types/models/models_0.d.ts +189 -3
  23. package/dist-types/pagination/ListSessionsPaginator.d.ts +7 -0
  24. package/dist-types/pagination/index.d.ts +1 -0
  25. package/dist-types/schemas/schemas_0.d.ts +5 -0
  26. package/dist-types/ts3.4/RedshiftData.d.ts +25 -0
  27. package/dist-types/ts3.4/RedshiftDataClient.d.ts +6 -0
  28. package/dist-types/ts3.4/commands/ListSessionsCommand.d.ts +38 -0
  29. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  30. package/dist-types/ts3.4/models/enums.d.ts +17 -6
  31. package/dist-types/ts3.4/models/errors.d.ts +6 -0
  32. package/dist-types/ts3.4/models/models_0.d.ts +47 -1
  33. package/dist-types/ts3.4/pagination/ListSessionsPaginator.d.ts +11 -0
  34. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  35. package/dist-types/ts3.4/schemas/schemas_0.d.ts +5 -0
  36. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { ResultFormatString, StatementStatusString, StatusString } from "./enums";
1
+ import type { ExecutionMode, ResultFormatString, SessionStatusString, StatementStatusString, StatusString } from "./enums";
2
2
  /**
3
3
  * <p>A parameter used in a SQL statement.</p>
4
4
  * @public
@@ -20,7 +20,7 @@ export interface SqlParameter {
20
20
  */
21
21
  export interface BatchExecuteStatementInput {
22
22
  /**
23
- * <p>One or more SQL statements to run. The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p>
23
+ * <p>One or more SQL statements to run. The SQL statements run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. By default, the SQL statements are run as a single transaction. If any SQL statement fails, all work is rolled back. To change this behavior, see the <code>ExecutionMode</code> parameter.</p>
24
24
  * @public
25
25
  */
26
26
  Sqls: string[] | undefined;
@@ -55,7 +55,7 @@ export interface BatchExecuteStatementInput {
55
55
  */
56
56
  StatementName?: string | undefined;
57
57
  /**
58
- * <p>The parameters for the SQL statements. The parameters are shared across all SQL statements in the batch.</p>
58
+ * <p>The parameters for the SQL statements. The parameters are available to all SQL statements in the batch. Each statement can reference any subset of the provided parameters. Each provided parameter must be referenced by at least one SQL statement in the batch.</p>
59
59
  * @public
60
60
  */
61
61
  Parameters?: SqlParameter[] | undefined;
@@ -84,6 +84,16 @@ export interface BatchExecuteStatementInput {
84
84
  * @public
85
85
  */
86
86
  SessionId?: string | undefined;
87
+ /**
88
+ * <p>Determines how the SQL statements in the batch are run. If set to <code>TRANSACTION</code> (the default), all SQL statements are run as a single transaction and they are committed or rolled back together. If set to <code>AUTO_COMMIT</code>, each SQL statement is committed individually, and a failure of one statement does not affect the others.</p>
89
+ * @public
90
+ */
91
+ ExecutionMode?: ExecutionMode | undefined;
92
+ /**
93
+ * <p>The number of seconds to wait for all SQL statements in the batch to complete execution before returning the response. If the SQL statements do not complete within the specified time, the response returns the current status. The maximum value is 30 seconds.</p>
94
+ * @public
95
+ */
96
+ WaitTimeSeconds?: number | undefined;
87
97
  }
88
98
  /**
89
99
  * @public
@@ -134,6 +144,21 @@ export interface BatchExecuteStatementOutput {
134
144
  * @public
135
145
  */
136
146
  SessionId?: string | undefined;
147
+ /**
148
+ * <p>The status of the SQL statement. Status values are defined as follows: </p> <ul> <li> <p>ABORTED - The query run was stopped by the user. </p> </li> <li> <p>FAILED - The query run failed. </p> </li> <li> <p>FINISHED - The query has finished running. </p> </li> <li> <p>PICKED - The query has been chosen to be run. </p> </li> <li> <p>STARTED - The query run has started. </p> </li> <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li> </ul>
149
+ * @public
150
+ */
151
+ Status?: StatementStatusString | undefined;
152
+ /**
153
+ * <p>The process identifier from Amazon Redshift. </p>
154
+ * @public
155
+ */
156
+ RedshiftPid?: number | undefined;
157
+ /**
158
+ * <p>A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.</p>
159
+ * @public
160
+ */
161
+ HasResultSet?: boolean | undefined;
137
162
  }
138
163
  /**
139
164
  * @public
@@ -235,6 +260,11 @@ export interface DescribeStatementRequest {
235
260
  * @public
236
261
  */
237
262
  Id: string | undefined;
263
+ /**
264
+ * <p>The number of seconds to wait for the SQL statement to complete execution before returning the description. The maximum value is 30 seconds.</p>
265
+ * @public
266
+ */
267
+ WaitTimeSeconds?: number | undefined;
238
268
  }
239
269
  /**
240
270
  * <p>Information about an SQL statement.</p>
@@ -406,6 +436,11 @@ export interface DescribeStatementResponse {
406
436
  * @public
407
437
  */
408
438
  SessionId?: string | undefined;
439
+ /**
440
+ * <p>The execution mode of the batch request. <code>TRANSACTION</code> indicates all SQL statements are run as a single transaction. <code>AUTO_COMMIT</code> indicates each SQL statement is committed individually.</p>
441
+ * @public
442
+ */
443
+ ExecutionMode?: ExecutionMode | undefined;
409
444
  }
410
445
  /**
411
446
  * @public
@@ -551,6 +586,11 @@ export interface ExecuteStatementInput {
551
586
  * @public
552
587
  */
553
588
  SessionId?: string | undefined;
589
+ /**
590
+ * <p>The number of seconds to wait for the SQL statement to complete execution before returning the response. If the SQL statement does not complete within the specified time, the response returns the current status. The maximum value is 30 seconds.</p>
591
+ * @public
592
+ */
593
+ WaitTimeSeconds?: number | undefined;
554
594
  }
555
595
  /**
556
596
  * @public
@@ -601,6 +641,21 @@ export interface ExecuteStatementOutput {
601
641
  * @public
602
642
  */
603
643
  SessionId?: string | undefined;
644
+ /**
645
+ * <p>The status of the SQL statement. Status values are defined as follows: </p> <ul> <li> <p>ABORTED - The query run was stopped by the user. </p> </li> <li> <p>FAILED - The query run failed. </p> </li> <li> <p>FINISHED - The query has finished running. </p> </li> <li> <p>PICKED - The query has been chosen to be run. </p> </li> <li> <p>STARTED - The query run has started. </p> </li> <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li> </ul>
646
+ * @public
647
+ */
648
+ Status?: StatementStatusString | undefined;
649
+ /**
650
+ * <p>The process identifier from Amazon Redshift. </p>
651
+ * @public
652
+ */
653
+ RedshiftPid?: number | undefined;
654
+ /**
655
+ * <p>A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.</p>
656
+ * @public
657
+ */
658
+ HasResultSet?: boolean | undefined;
604
659
  }
605
660
  /**
606
661
  * <p>A data value in a column. </p>
@@ -762,6 +817,11 @@ export interface GetStatementResultRequest {
762
817
  * @public
763
818
  */
764
819
  NextToken?: string | undefined;
820
+ /**
821
+ * <p>The number of seconds to wait for the SQL statement to complete execution before returning the result. The maximum value is 30 seconds.</p>
822
+ * @public
823
+ */
824
+ WaitTimeSeconds?: number | undefined;
765
825
  }
766
826
  /**
767
827
  * @public
@@ -802,6 +862,11 @@ export interface GetStatementResultV2Request {
802
862
  * @public
803
863
  */
804
864
  NextToken?: string | undefined;
865
+ /**
866
+ * <p>The number of seconds to wait for the SQL statement to complete execution before returning the result. The maximum value is 30 seconds.</p>
867
+ * @public
868
+ */
869
+ WaitTimeSeconds?: number | undefined;
805
870
  }
806
871
  /**
807
872
  * @public
@@ -953,6 +1018,127 @@ export interface ListSchemasResponse {
953
1018
  */
954
1019
  NextToken?: string | undefined;
955
1020
  }
1021
+ /**
1022
+ * @public
1023
+ */
1024
+ export interface ListSessionsRequest {
1025
+ /**
1026
+ * <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
1027
+ * @public
1028
+ */
1029
+ NextToken?: string | undefined;
1030
+ /**
1031
+ * <p>The maximum number of sessions to return in the response. If more sessions exist than fit in one response, the operation returns <code>NextToken</code> to paginate the results.</p>
1032
+ * @public
1033
+ */
1034
+ MaxResults?: number | undefined;
1035
+ /**
1036
+ * <p>The identifier of a specific session to return metadata for. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. When you provide <code>SessionId</code>, you can't specify <code>Status</code>, <code>ClusterIdentifier</code>, <code>WorkgroupName</code>, or <code>Database</code>.</p>
1037
+ * @public
1038
+ */
1039
+ SessionId?: string | undefined;
1040
+ /**
1041
+ * <p>The status of the sessions to list. If no status is specified, sessions with a status of <code>AVAILABLE</code> or <code>BUSY</code> are returned. Status values are defined as follows:</p> <ul> <li> <p>AVAILABLE – The session is open and ready to run a SQL statement.</p> </li> <li> <p>BUSY – The session is currently running a SQL statement.</p> </li> <li> <p>CLOSED – The session is closed and can no longer run SQL statements.</p> </li> </ul>
1042
+ * @public
1043
+ */
1044
+ Status?: SessionStatusString | undefined;
1045
+ /**
1046
+ * <p>Specifies whether to return all sessions created by the caller's IAM role, including sessions from previous IAM sessions. If false, only sessions created in the current IAM session are returned. The default is true.</p>
1047
+ * @public
1048
+ */
1049
+ RoleLevel?: boolean | undefined;
1050
+ /**
1051
+ * <p>The cluster identifier. Only sessions on this cluster are returned. When providing <code>ClusterIdentifier</code>, then <code>WorkgroupName</code> can't be specified.</p>
1052
+ * @public
1053
+ */
1054
+ ClusterIdentifier?: string | undefined;
1055
+ /**
1056
+ * <p>The serverless workgroup name or Amazon Resource Name (ARN). Only sessions on this workgroup are returned. When providing <code>WorkgroupName</code>, then <code>ClusterIdentifier</code> can't be specified.</p>
1057
+ * @public
1058
+ */
1059
+ WorkgroupName?: string | undefined;
1060
+ /**
1061
+ * <p>The name of the database. Only sessions connected to this database are returned.</p>
1062
+ * @public
1063
+ */
1064
+ Database?: string | undefined;
1065
+ }
1066
+ /**
1067
+ * <p>Contains the metadata for a session returned by <code>ListSessions</code>, including its status, compute target, database connection, and lifecycle timestamps.</p>
1068
+ * @public
1069
+ */
1070
+ export interface SessionData {
1071
+ /**
1072
+ * <p>The session identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.</p>
1073
+ * @public
1074
+ */
1075
+ SessionId: string | undefined;
1076
+ /**
1077
+ * <p>The status of the session. Status values are defined as follows:</p> <ul> <li> <p>AVAILABLE – The session is open and ready to run a SQL statement.</p> </li> <li> <p>BUSY – The session is currently running a SQL statement.</p> </li> <li> <p>CLOSED – The session is closed and can no longer run SQL statements.</p> </li> </ul>
1078
+ * @public
1079
+ */
1080
+ Status: SessionStatusString | undefined;
1081
+ /**
1082
+ * <p>The date and time (UTC) when the session was created.</p>
1083
+ * @public
1084
+ */
1085
+ CreatedAt: Date | undefined;
1086
+ /**
1087
+ * <p>The date and time (UTC) that the session metadata was last updated. An example is the time the status last changed.</p>
1088
+ * @public
1089
+ */
1090
+ UpdatedAt?: Date | undefined;
1091
+ /**
1092
+ * <p>The name of the database that the session is connected to.</p>
1093
+ * @public
1094
+ */
1095
+ Database?: string | undefined;
1096
+ /**
1097
+ * <p>The database user name.</p>
1098
+ * @public
1099
+ */
1100
+ DbUser?: string | undefined;
1101
+ /**
1102
+ * <p>The cluster identifier. This element is not returned when connecting to a serverless workgroup.</p>
1103
+ * @public
1104
+ */
1105
+ ClusterIdentifier?: string | undefined;
1106
+ /**
1107
+ * <p>The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.</p>
1108
+ * @public
1109
+ */
1110
+ WorkgroupName?: string | undefined;
1111
+ /**
1112
+ * <p>The number of seconds that the session is kept alive after a query finishes.</p>
1113
+ * @public
1114
+ */
1115
+ SessionAliveSeconds?: number | undefined;
1116
+ /**
1117
+ * <p>The date and time (UTC) when the session is set to expire and be closed.</p>
1118
+ * @public
1119
+ */
1120
+ SessionTtl?: Date | undefined;
1121
+ /**
1122
+ * <p>The identifier of the SQL statement currently running in the session. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This element is returned only when the session status is <code>BUSY</code>.</p>
1123
+ * @public
1124
+ */
1125
+ CurrentStatementId?: string | undefined;
1126
+ }
1127
+ /**
1128
+ * @public
1129
+ */
1130
+ export interface ListSessionsResponse {
1131
+ /**
1132
+ * <p>The sessions that match the request.</p>
1133
+ * @public
1134
+ */
1135
+ Sessions: SessionData[] | undefined;
1136
+ /**
1137
+ * <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
1138
+ * @public
1139
+ */
1140
+ NextToken?: string | undefined;
1141
+ }
956
1142
  /**
957
1143
  * @public
958
1144
  */
@@ -0,0 +1,7 @@
1
+ import type { Paginator } from "@smithy/types";
2
+ import { ListSessionsCommandInput, ListSessionsCommandOutput } from "../commands/ListSessionsCommand";
3
+ import type { RedshiftDataPaginationConfiguration } from "./Interfaces";
4
+ /**
5
+ * @public
6
+ */
7
+ export declare const paginateListSessions: (config: RedshiftDataPaginationConfiguration, input: ListSessionsCommandInput, ...rest: any[]) => Paginator<ListSessionsCommandOutput>;
@@ -4,5 +4,6 @@ export * from "./GetStatementResultPaginator";
4
4
  export * from "./GetStatementResultV2Paginator";
5
5
  export * from "./ListDatabasesPaginator";
6
6
  export * from "./ListSchemasPaginator";
7
+ export * from "./ListSessionsPaginator";
7
8
  export * from "./ListStatementsPaginator";
8
9
  export * from "./ListTablesPaginator";
@@ -3,6 +3,7 @@ import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema, S
3
3
  export declare var RedshiftDataServiceException$: StaticErrorSchema;
4
4
  export declare var ActiveSessionsExceededException$: StaticErrorSchema;
5
5
  export declare var ActiveStatementsExceededException$: StaticErrorSchema;
6
+ export declare var ActiveWaitingRequestsExceededException$: StaticErrorSchema;
6
7
  export declare var BatchExecuteStatementException$: StaticErrorSchema;
7
8
  export declare var DatabaseConnectionException$: StaticErrorSchema;
8
9
  export declare var ExecuteStatementException$: StaticErrorSchema;
@@ -35,10 +36,13 @@ export declare var ListDatabasesRequest$: StaticStructureSchema;
35
36
  export declare var ListDatabasesResponse$: StaticStructureSchema;
36
37
  export declare var ListSchemasRequest$: StaticStructureSchema;
37
38
  export declare var ListSchemasResponse$: StaticStructureSchema;
39
+ export declare var ListSessionsRequest$: StaticStructureSchema;
40
+ export declare var ListSessionsResponse$: StaticStructureSchema;
38
41
  export declare var ListStatementsRequest$: StaticStructureSchema;
39
42
  export declare var ListStatementsResponse$: StaticStructureSchema;
40
43
  export declare var ListTablesRequest$: StaticStructureSchema;
41
44
  export declare var ListTablesResponse$: StaticStructureSchema;
45
+ export declare var SessionData$: StaticStructureSchema;
42
46
  export declare var SqlParameter$: StaticStructureSchema;
43
47
  export declare var StatementData$: StaticStructureSchema;
44
48
  export declare var SubStatementData$: StaticStructureSchema;
@@ -54,5 +58,6 @@ export declare var GetStatementResult$: StaticOperationSchema;
54
58
  export declare var GetStatementResultV2$: StaticOperationSchema;
55
59
  export declare var ListDatabases$: StaticOperationSchema;
56
60
  export declare var ListSchemas$: StaticOperationSchema;
61
+ export declare var ListSessions$: StaticOperationSchema;
57
62
  export declare var ListStatements$: StaticOperationSchema;
58
63
  export declare var ListTables$: StaticOperationSchema;
@@ -36,6 +36,10 @@ import {
36
36
  ListDatabasesCommandOutput,
37
37
  } from "./commands/ListDatabasesCommand";
38
38
  import { ListSchemasCommandInput, ListSchemasCommandOutput } from "./commands/ListSchemasCommand";
39
+ import {
40
+ ListSessionsCommandInput,
41
+ ListSessionsCommandOutput,
42
+ } from "./commands/ListSessionsCommand";
39
43
  import {
40
44
  ListStatementsCommandInput,
41
45
  ListStatementsCommandOutput,
@@ -160,6 +164,20 @@ export interface RedshiftData {
160
164
  options: __HttpHandlerOptions,
161
165
  cb: (err: any, data?: ListSchemasCommandOutput) => void,
162
166
  ): void;
167
+ listSessions(): Promise<ListSessionsCommandOutput>;
168
+ listSessions(
169
+ args: ListSessionsCommandInput,
170
+ options?: __HttpHandlerOptions,
171
+ ): Promise<ListSessionsCommandOutput>;
172
+ listSessions(
173
+ args: ListSessionsCommandInput,
174
+ cb: (err: any, data?: ListSessionsCommandOutput) => void,
175
+ ): void;
176
+ listSessions(
177
+ args: ListSessionsCommandInput,
178
+ options: __HttpHandlerOptions,
179
+ cb: (err: any, data?: ListSessionsCommandOutput) => void,
180
+ ): void;
163
181
  listStatements(): Promise<ListStatementsCommandOutput>;
164
182
  listStatements(
165
183
  args: ListStatementsCommandInput,
@@ -222,6 +240,13 @@ export interface RedshiftData {
222
240
  Exclude<keyof PaginationConfiguration, "client">
223
241
  >,
224
242
  ): Paginator<ListSchemasCommandOutput>;
243
+ paginateListSessions(
244
+ args?: ListSessionsCommandInput,
245
+ paginationConfig?: Pick<
246
+ PaginationConfiguration,
247
+ Exclude<keyof PaginationConfiguration, "client">
248
+ >,
249
+ ): Paginator<ListSessionsCommandOutput>;
225
250
  paginateListStatements(
226
251
  args?: ListStatementsCommandInput,
227
252
  paginationConfig?: Pick<
@@ -66,6 +66,10 @@ import {
66
66
  ListDatabasesCommandOutput,
67
67
  } from "./commands/ListDatabasesCommand";
68
68
  import { ListSchemasCommandInput, ListSchemasCommandOutput } from "./commands/ListSchemasCommand";
69
+ import {
70
+ ListSessionsCommandInput,
71
+ ListSessionsCommandOutput,
72
+ } from "./commands/ListSessionsCommand";
69
73
  import {
70
74
  ListStatementsCommandInput,
71
75
  ListStatementsCommandOutput,
@@ -88,6 +92,7 @@ export type ServiceInputTypes =
88
92
  | GetStatementResultV2CommandInput
89
93
  | ListDatabasesCommandInput
90
94
  | ListSchemasCommandInput
95
+ | ListSessionsCommandInput
91
96
  | ListStatementsCommandInput
92
97
  | ListTablesCommandInput;
93
98
  export type ServiceOutputTypes =
@@ -100,6 +105,7 @@ export type ServiceOutputTypes =
100
105
  | GetStatementResultV2CommandOutput
101
106
  | ListDatabasesCommandOutput
102
107
  | ListSchemasCommandOutput
108
+ | ListSessionsCommandOutput
103
109
  | ListStatementsCommandOutput
104
110
  | ListTablesCommandOutput;
105
111
  export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
@@ -0,0 +1,38 @@
1
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import { ListSessionsRequest, ListSessionsResponse } from "../models/models_0";
3
+ export { __MetadataBearer };
4
+ export interface ListSessionsCommandInput extends ListSessionsRequest {}
5
+ export interface ListSessionsCommandOutput extends ListSessionsResponse, __MetadataBearer {}
6
+ declare const ListSessionsCommand_base: {
7
+ new (
8
+ input: ListSessionsCommandInput,
9
+ ): import("@smithy/core/client").CommandImpl<
10
+ ListSessionsCommandInput,
11
+ ListSessionsCommandOutput,
12
+ import("..").RedshiftDataClientResolvedConfig,
13
+ import("..").ServiceInputTypes,
14
+ import("..").ServiceOutputTypes
15
+ >;
16
+ new (
17
+ ...[input]: [] | [ListSessionsCommandInput]
18
+ ): import("@smithy/core/client").CommandImpl<
19
+ ListSessionsCommandInput,
20
+ ListSessionsCommandOutput,
21
+ import("..").RedshiftDataClientResolvedConfig,
22
+ import("..").ServiceInputTypes,
23
+ import("..").ServiceOutputTypes
24
+ >;
25
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
26
+ };
27
+ export declare class ListSessionsCommand extends ListSessionsCommand_base {
28
+ protected static __types: {
29
+ api: {
30
+ input: ListSessionsRequest;
31
+ output: ListSessionsResponse;
32
+ };
33
+ sdk: {
34
+ input: ListSessionsCommandInput;
35
+ output: ListSessionsCommandOutput;
36
+ };
37
+ };
38
+ }
@@ -7,5 +7,6 @@ export * from "./GetStatementResultCommand";
7
7
  export * from "./GetStatementResultV2Command";
8
8
  export * from "./ListDatabasesCommand";
9
9
  export * from "./ListSchemasCommand";
10
+ export * from "./ListSessionsCommand";
10
11
  export * from "./ListStatementsCommand";
11
12
  export * from "./ListTablesCommand";
@@ -1,25 +1,36 @@
1
+ export declare const ExecutionMode: {
2
+ readonly AUTO_COMMIT: "AUTO_COMMIT";
3
+ readonly TRANSACTION: "TRANSACTION";
4
+ };
5
+ export type ExecutionMode = (typeof ExecutionMode)[keyof typeof ExecutionMode];
1
6
  export declare const ResultFormatString: {
2
7
  readonly CSV: "CSV";
3
8
  readonly JSON: "JSON";
4
9
  };
5
10
  export type ResultFormatString = (typeof ResultFormatString)[keyof typeof ResultFormatString];
6
- export declare const StatusString: {
11
+ export declare const StatementStatusString: {
7
12
  readonly ABORTED: "ABORTED";
8
- readonly ALL: "ALL";
9
13
  readonly FAILED: "FAILED";
10
14
  readonly FINISHED: "FINISHED";
11
15
  readonly PICKED: "PICKED";
12
16
  readonly STARTED: "STARTED";
13
17
  readonly SUBMITTED: "SUBMITTED";
14
18
  };
15
- export type StatusString = (typeof StatusString)[keyof typeof StatusString];
16
- export declare const StatementStatusString: {
19
+ export type StatementStatusString =
20
+ (typeof StatementStatusString)[keyof typeof StatementStatusString];
21
+ export declare const StatusString: {
17
22
  readonly ABORTED: "ABORTED";
23
+ readonly ALL: "ALL";
18
24
  readonly FAILED: "FAILED";
19
25
  readonly FINISHED: "FINISHED";
20
26
  readonly PICKED: "PICKED";
21
27
  readonly STARTED: "STARTED";
22
28
  readonly SUBMITTED: "SUBMITTED";
23
29
  };
24
- export type StatementStatusString =
25
- (typeof StatementStatusString)[keyof typeof StatementStatusString];
30
+ export type StatusString = (typeof StatusString)[keyof typeof StatusString];
31
+ export declare const SessionStatusString: {
32
+ readonly AVAILABLE: "AVAILABLE";
33
+ readonly BUSY: "BUSY";
34
+ readonly CLOSED: "CLOSED";
35
+ };
36
+ export type SessionStatusString = (typeof SessionStatusString)[keyof typeof SessionStatusString];
@@ -12,6 +12,12 @@ export declare class ActiveStatementsExceededException extends __BaseException {
12
12
  Message?: string | undefined;
13
13
  constructor(opts: __ExceptionOptionType<ActiveStatementsExceededException, __BaseException>);
14
14
  }
15
+ export declare class ActiveWaitingRequestsExceededException extends __BaseException {
16
+ readonly name: "ActiveWaitingRequestsExceededException";
17
+ readonly $fault: "client";
18
+ Message?: string | undefined;
19
+ constructor(opts: __ExceptionOptionType<ActiveWaitingRequestsExceededException, __BaseException>);
20
+ }
15
21
  export declare class BatchExecuteStatementException extends __BaseException {
16
22
  readonly name: "BatchExecuteStatementException";
17
23
  readonly $fault: "server";
@@ -1,4 +1,10 @@
1
- import { ResultFormatString, StatementStatusString, StatusString } from "./enums";
1
+ import {
2
+ ExecutionMode,
3
+ ResultFormatString,
4
+ SessionStatusString,
5
+ StatementStatusString,
6
+ StatusString,
7
+ } from "./enums";
2
8
  export interface SqlParameter {
3
9
  name: string | undefined;
4
10
  value: string | undefined;
@@ -17,6 +23,8 @@ export interface BatchExecuteStatementInput {
17
23
  ResultFormat?: ResultFormatString | undefined;
18
24
  SessionKeepAliveSeconds?: number | undefined;
19
25
  SessionId?: string | undefined;
26
+ ExecutionMode?: ExecutionMode | undefined;
27
+ WaitTimeSeconds?: number | undefined;
20
28
  }
21
29
  export interface BatchExecuteStatementOutput {
22
30
  Id?: string | undefined;
@@ -28,6 +36,9 @@ export interface BatchExecuteStatementOutput {
28
36
  SecretArn?: string | undefined;
29
37
  WorkgroupName?: string | undefined;
30
38
  SessionId?: string | undefined;
39
+ Status?: StatementStatusString | undefined;
40
+ RedshiftPid?: number | undefined;
41
+ HasResultSet?: boolean | undefined;
31
42
  }
32
43
  export interface CancelStatementRequest {
33
44
  Id: string | undefined;
@@ -52,6 +63,7 @@ export interface ColumnMetadata {
52
63
  }
53
64
  export interface DescribeStatementRequest {
54
65
  Id: string | undefined;
66
+ WaitTimeSeconds?: number | undefined;
55
67
  }
56
68
  export interface SubStatementData {
57
69
  Id: string | undefined;
@@ -88,6 +100,7 @@ export interface DescribeStatementResponse {
88
100
  WorkgroupName?: string | undefined;
89
101
  ResultFormat?: ResultFormatString | undefined;
90
102
  SessionId?: string | undefined;
103
+ ExecutionMode?: ExecutionMode | undefined;
91
104
  }
92
105
  export interface DescribeTableRequest {
93
106
  ClusterIdentifier?: string | undefined;
@@ -120,6 +133,7 @@ export interface ExecuteStatementInput {
120
133
  ResultFormat?: ResultFormatString | undefined;
121
134
  SessionKeepAliveSeconds?: number | undefined;
122
135
  SessionId?: string | undefined;
136
+ WaitTimeSeconds?: number | undefined;
123
137
  }
124
138
  export interface ExecuteStatementOutput {
125
139
  Id?: string | undefined;
@@ -131,6 +145,9 @@ export interface ExecuteStatementOutput {
131
145
  SecretArn?: string | undefined;
132
146
  WorkgroupName?: string | undefined;
133
147
  SessionId?: string | undefined;
148
+ Status?: StatementStatusString | undefined;
149
+ RedshiftPid?: number | undefined;
150
+ HasResultSet?: boolean | undefined;
134
151
  }
135
152
  export type Field =
136
153
  | Field.BlobValueMember
@@ -232,6 +249,7 @@ export declare namespace QueryRecords {
232
249
  export interface GetStatementResultRequest {
233
250
  Id: string | undefined;
234
251
  NextToken?: string | undefined;
252
+ WaitTimeSeconds?: number | undefined;
235
253
  }
236
254
  export interface GetStatementResultResponse {
237
255
  Records: Field[][] | undefined;
@@ -242,6 +260,7 @@ export interface GetStatementResultResponse {
242
260
  export interface GetStatementResultV2Request {
243
261
  Id: string | undefined;
244
262
  NextToken?: string | undefined;
263
+ WaitTimeSeconds?: number | undefined;
245
264
  }
246
265
  export interface GetStatementResultV2Response {
247
266
  Records: QueryRecords[] | undefined;
@@ -278,6 +297,33 @@ export interface ListSchemasResponse {
278
297
  Schemas?: string[] | undefined;
279
298
  NextToken?: string | undefined;
280
299
  }
300
+ export interface ListSessionsRequest {
301
+ NextToken?: string | undefined;
302
+ MaxResults?: number | undefined;
303
+ SessionId?: string | undefined;
304
+ Status?: SessionStatusString | undefined;
305
+ RoleLevel?: boolean | undefined;
306
+ ClusterIdentifier?: string | undefined;
307
+ WorkgroupName?: string | undefined;
308
+ Database?: string | undefined;
309
+ }
310
+ export interface SessionData {
311
+ SessionId: string | undefined;
312
+ Status: SessionStatusString | undefined;
313
+ CreatedAt: Date | undefined;
314
+ UpdatedAt?: Date | undefined;
315
+ Database?: string | undefined;
316
+ DbUser?: string | undefined;
317
+ ClusterIdentifier?: string | undefined;
318
+ WorkgroupName?: string | undefined;
319
+ SessionAliveSeconds?: number | undefined;
320
+ SessionTtl?: Date | undefined;
321
+ CurrentStatementId?: string | undefined;
322
+ }
323
+ export interface ListSessionsResponse {
324
+ Sessions: SessionData[] | undefined;
325
+ NextToken?: string | undefined;
326
+ }
281
327
  export interface ListStatementsRequest {
282
328
  NextToken?: string | undefined;
283
329
  MaxResults?: number | undefined;
@@ -0,0 +1,11 @@
1
+ import { Paginator } from "@smithy/types";
2
+ import {
3
+ ListSessionsCommandInput,
4
+ ListSessionsCommandOutput,
5
+ } from "../commands/ListSessionsCommand";
6
+ import { RedshiftDataPaginationConfiguration } from "./Interfaces";
7
+ export declare const paginateListSessions: (
8
+ config: RedshiftDataPaginationConfiguration,
9
+ input: ListSessionsCommandInput,
10
+ ...rest: any[]
11
+ ) => Paginator<ListSessionsCommandOutput>;
@@ -4,5 +4,6 @@ export * from "./GetStatementResultPaginator";
4
4
  export * from "./GetStatementResultV2Paginator";
5
5
  export * from "./ListDatabasesPaginator";
6
6
  export * from "./ListSchemasPaginator";
7
+ export * from "./ListSessionsPaginator";
7
8
  export * from "./ListStatementsPaginator";
8
9
  export * from "./ListTablesPaginator";
@@ -8,6 +8,7 @@ import {
8
8
  export declare var RedshiftDataServiceException$: StaticErrorSchema;
9
9
  export declare var ActiveSessionsExceededException$: StaticErrorSchema;
10
10
  export declare var ActiveStatementsExceededException$: StaticErrorSchema;
11
+ export declare var ActiveWaitingRequestsExceededException$: StaticErrorSchema;
11
12
  export declare var BatchExecuteStatementException$: StaticErrorSchema;
12
13
  export declare var DatabaseConnectionException$: StaticErrorSchema;
13
14
  export declare var ExecuteStatementException$: StaticErrorSchema;
@@ -35,10 +36,13 @@ export declare var ListDatabasesRequest$: StaticStructureSchema;
35
36
  export declare var ListDatabasesResponse$: StaticStructureSchema;
36
37
  export declare var ListSchemasRequest$: StaticStructureSchema;
37
38
  export declare var ListSchemasResponse$: StaticStructureSchema;
39
+ export declare var ListSessionsRequest$: StaticStructureSchema;
40
+ export declare var ListSessionsResponse$: StaticStructureSchema;
38
41
  export declare var ListStatementsRequest$: StaticStructureSchema;
39
42
  export declare var ListStatementsResponse$: StaticStructureSchema;
40
43
  export declare var ListTablesRequest$: StaticStructureSchema;
41
44
  export declare var ListTablesResponse$: StaticStructureSchema;
45
+ export declare var SessionData$: StaticStructureSchema;
42
46
  export declare var SqlParameter$: StaticStructureSchema;
43
47
  export declare var StatementData$: StaticStructureSchema;
44
48
  export declare var SubStatementData$: StaticStructureSchema;
@@ -54,5 +58,6 @@ export declare var GetStatementResult$: StaticOperationSchema;
54
58
  export declare var GetStatementResultV2$: StaticOperationSchema;
55
59
  export declare var ListDatabases$: StaticOperationSchema;
56
60
  export declare var ListSchemas$: StaticOperationSchema;
61
+ export declare var ListSessions$: StaticOperationSchema;
57
62
  export declare var ListStatements$: StaticOperationSchema;
58
63
  export declare var ListTables$: StaticOperationSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-redshift-data",
3
- "version": "3.1092.0",
3
+ "version": "3.1094.0",
4
4
  "description": "AWS SDK for JavaScript Redshift Data Client for Node.js, Browser and React Native",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-redshift-data",
6
6
  "license": "Apache-2.0",