@aws-sdk/client-redshift-data 3.315.0 → 3.319.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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RedshiftData = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const BatchExecuteStatementCommand_1 = require("./commands/BatchExecuteStatementCommand");
5
6
  const CancelStatementCommand_1 = require("./commands/CancelStatementCommand");
6
7
  const DescribeStatementCommand_1 = require("./commands/DescribeStatementCommand");
@@ -12,146 +13,19 @@ const ListSchemasCommand_1 = require("./commands/ListSchemasCommand");
12
13
  const ListStatementsCommand_1 = require("./commands/ListStatementsCommand");
13
14
  const ListTablesCommand_1 = require("./commands/ListTablesCommand");
14
15
  const RedshiftDataClient_1 = require("./RedshiftDataClient");
16
+ const commands = {
17
+ BatchExecuteStatementCommand: BatchExecuteStatementCommand_1.BatchExecuteStatementCommand,
18
+ CancelStatementCommand: CancelStatementCommand_1.CancelStatementCommand,
19
+ DescribeStatementCommand: DescribeStatementCommand_1.DescribeStatementCommand,
20
+ DescribeTableCommand: DescribeTableCommand_1.DescribeTableCommand,
21
+ ExecuteStatementCommand: ExecuteStatementCommand_1.ExecuteStatementCommand,
22
+ GetStatementResultCommand: GetStatementResultCommand_1.GetStatementResultCommand,
23
+ ListDatabasesCommand: ListDatabasesCommand_1.ListDatabasesCommand,
24
+ ListSchemasCommand: ListSchemasCommand_1.ListSchemasCommand,
25
+ ListStatementsCommand: ListStatementsCommand_1.ListStatementsCommand,
26
+ ListTablesCommand: ListTablesCommand_1.ListTablesCommand,
27
+ };
15
28
  class RedshiftData extends RedshiftDataClient_1.RedshiftDataClient {
16
- batchExecuteStatement(args, optionsOrCb, cb) {
17
- const command = new BatchExecuteStatementCommand_1.BatchExecuteStatementCommand(args);
18
- if (typeof optionsOrCb === "function") {
19
- this.send(command, optionsOrCb);
20
- }
21
- else if (typeof cb === "function") {
22
- if (typeof optionsOrCb !== "object")
23
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
24
- this.send(command, optionsOrCb || {}, cb);
25
- }
26
- else {
27
- return this.send(command, optionsOrCb);
28
- }
29
- }
30
- cancelStatement(args, optionsOrCb, cb) {
31
- const command = new CancelStatementCommand_1.CancelStatementCommand(args);
32
- if (typeof optionsOrCb === "function") {
33
- this.send(command, optionsOrCb);
34
- }
35
- else if (typeof cb === "function") {
36
- if (typeof optionsOrCb !== "object")
37
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
38
- this.send(command, optionsOrCb || {}, cb);
39
- }
40
- else {
41
- return this.send(command, optionsOrCb);
42
- }
43
- }
44
- describeStatement(args, optionsOrCb, cb) {
45
- const command = new DescribeStatementCommand_1.DescribeStatementCommand(args);
46
- if (typeof optionsOrCb === "function") {
47
- this.send(command, optionsOrCb);
48
- }
49
- else if (typeof cb === "function") {
50
- if (typeof optionsOrCb !== "object")
51
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
52
- this.send(command, optionsOrCb || {}, cb);
53
- }
54
- else {
55
- return this.send(command, optionsOrCb);
56
- }
57
- }
58
- describeTable(args, optionsOrCb, cb) {
59
- const command = new DescribeTableCommand_1.DescribeTableCommand(args);
60
- if (typeof optionsOrCb === "function") {
61
- this.send(command, optionsOrCb);
62
- }
63
- else if (typeof cb === "function") {
64
- if (typeof optionsOrCb !== "object")
65
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
66
- this.send(command, optionsOrCb || {}, cb);
67
- }
68
- else {
69
- return this.send(command, optionsOrCb);
70
- }
71
- }
72
- executeStatement(args, optionsOrCb, cb) {
73
- const command = new ExecuteStatementCommand_1.ExecuteStatementCommand(args);
74
- if (typeof optionsOrCb === "function") {
75
- this.send(command, optionsOrCb);
76
- }
77
- else if (typeof cb === "function") {
78
- if (typeof optionsOrCb !== "object")
79
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
80
- this.send(command, optionsOrCb || {}, cb);
81
- }
82
- else {
83
- return this.send(command, optionsOrCb);
84
- }
85
- }
86
- getStatementResult(args, optionsOrCb, cb) {
87
- const command = new GetStatementResultCommand_1.GetStatementResultCommand(args);
88
- if (typeof optionsOrCb === "function") {
89
- this.send(command, optionsOrCb);
90
- }
91
- else if (typeof cb === "function") {
92
- if (typeof optionsOrCb !== "object")
93
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
94
- this.send(command, optionsOrCb || {}, cb);
95
- }
96
- else {
97
- return this.send(command, optionsOrCb);
98
- }
99
- }
100
- listDatabases(args, optionsOrCb, cb) {
101
- const command = new ListDatabasesCommand_1.ListDatabasesCommand(args);
102
- if (typeof optionsOrCb === "function") {
103
- this.send(command, optionsOrCb);
104
- }
105
- else if (typeof cb === "function") {
106
- if (typeof optionsOrCb !== "object")
107
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
108
- this.send(command, optionsOrCb || {}, cb);
109
- }
110
- else {
111
- return this.send(command, optionsOrCb);
112
- }
113
- }
114
- listSchemas(args, optionsOrCb, cb) {
115
- const command = new ListSchemasCommand_1.ListSchemasCommand(args);
116
- if (typeof optionsOrCb === "function") {
117
- this.send(command, optionsOrCb);
118
- }
119
- else if (typeof cb === "function") {
120
- if (typeof optionsOrCb !== "object")
121
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
122
- this.send(command, optionsOrCb || {}, cb);
123
- }
124
- else {
125
- return this.send(command, optionsOrCb);
126
- }
127
- }
128
- listStatements(args, optionsOrCb, cb) {
129
- const command = new ListStatementsCommand_1.ListStatementsCommand(args);
130
- if (typeof optionsOrCb === "function") {
131
- this.send(command, optionsOrCb);
132
- }
133
- else if (typeof cb === "function") {
134
- if (typeof optionsOrCb !== "object")
135
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
136
- this.send(command, optionsOrCb || {}, cb);
137
- }
138
- else {
139
- return this.send(command, optionsOrCb);
140
- }
141
- }
142
- listTables(args, optionsOrCb, cb) {
143
- const command = new ListTablesCommand_1.ListTablesCommand(args);
144
- if (typeof optionsOrCb === "function") {
145
- this.send(command, optionsOrCb);
146
- }
147
- else if (typeof cb === "function") {
148
- if (typeof optionsOrCb !== "object")
149
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
150
- this.send(command, optionsOrCb || {}, cb);
151
- }
152
- else {
153
- return this.send(command, optionsOrCb);
154
- }
155
- }
156
29
  }
157
30
  exports.RedshiftData = RedshiftData;
31
+ (0, smithy_client_1.createAggregatedClient)(commands, RedshiftData);
@@ -531,7 +531,7 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
531
531
  };
532
532
  const se_BatchExecuteStatementInput = (input, context) => {
533
533
  return (0, smithy_client_1.take)(input, {
534
- ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
534
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
535
535
  ClusterIdentifier: [],
536
536
  Database: [],
537
537
  DbUser: [],
@@ -544,7 +544,7 @@ const se_BatchExecuteStatementInput = (input, context) => {
544
544
  };
545
545
  const se_ExecuteStatementInput = (input, context) => {
546
546
  return (0, smithy_client_1.take)(input, {
547
- ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
547
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
548
548
  ClusterIdentifier: [],
549
549
  Database: [],
550
550
  DbUser: [],
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { BatchExecuteStatementCommand, } from "./commands/BatchExecuteStatementCommand";
2
3
  import { CancelStatementCommand, } from "./commands/CancelStatementCommand";
3
4
  import { DescribeStatementCommand, } from "./commands/DescribeStatementCommand";
@@ -9,145 +10,18 @@ import { ListSchemasCommand } from "./commands/ListSchemasCommand";
9
10
  import { ListStatementsCommand, } from "./commands/ListStatementsCommand";
10
11
  import { ListTablesCommand } from "./commands/ListTablesCommand";
11
12
  import { RedshiftDataClient } from "./RedshiftDataClient";
13
+ const commands = {
14
+ BatchExecuteStatementCommand,
15
+ CancelStatementCommand,
16
+ DescribeStatementCommand,
17
+ DescribeTableCommand,
18
+ ExecuteStatementCommand,
19
+ GetStatementResultCommand,
20
+ ListDatabasesCommand,
21
+ ListSchemasCommand,
22
+ ListStatementsCommand,
23
+ ListTablesCommand,
24
+ };
12
25
  export class RedshiftData extends RedshiftDataClient {
13
- batchExecuteStatement(args, optionsOrCb, cb) {
14
- const command = new BatchExecuteStatementCommand(args);
15
- if (typeof optionsOrCb === "function") {
16
- this.send(command, optionsOrCb);
17
- }
18
- else if (typeof cb === "function") {
19
- if (typeof optionsOrCb !== "object")
20
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
21
- this.send(command, optionsOrCb || {}, cb);
22
- }
23
- else {
24
- return this.send(command, optionsOrCb);
25
- }
26
- }
27
- cancelStatement(args, optionsOrCb, cb) {
28
- const command = new CancelStatementCommand(args);
29
- if (typeof optionsOrCb === "function") {
30
- this.send(command, optionsOrCb);
31
- }
32
- else if (typeof cb === "function") {
33
- if (typeof optionsOrCb !== "object")
34
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
35
- this.send(command, optionsOrCb || {}, cb);
36
- }
37
- else {
38
- return this.send(command, optionsOrCb);
39
- }
40
- }
41
- describeStatement(args, optionsOrCb, cb) {
42
- const command = new DescribeStatementCommand(args);
43
- if (typeof optionsOrCb === "function") {
44
- this.send(command, optionsOrCb);
45
- }
46
- else if (typeof cb === "function") {
47
- if (typeof optionsOrCb !== "object")
48
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
49
- this.send(command, optionsOrCb || {}, cb);
50
- }
51
- else {
52
- return this.send(command, optionsOrCb);
53
- }
54
- }
55
- describeTable(args, optionsOrCb, cb) {
56
- const command = new DescribeTableCommand(args);
57
- if (typeof optionsOrCb === "function") {
58
- this.send(command, optionsOrCb);
59
- }
60
- else if (typeof cb === "function") {
61
- if (typeof optionsOrCb !== "object")
62
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
63
- this.send(command, optionsOrCb || {}, cb);
64
- }
65
- else {
66
- return this.send(command, optionsOrCb);
67
- }
68
- }
69
- executeStatement(args, optionsOrCb, cb) {
70
- const command = new ExecuteStatementCommand(args);
71
- if (typeof optionsOrCb === "function") {
72
- this.send(command, optionsOrCb);
73
- }
74
- else if (typeof cb === "function") {
75
- if (typeof optionsOrCb !== "object")
76
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
77
- this.send(command, optionsOrCb || {}, cb);
78
- }
79
- else {
80
- return this.send(command, optionsOrCb);
81
- }
82
- }
83
- getStatementResult(args, optionsOrCb, cb) {
84
- const command = new GetStatementResultCommand(args);
85
- if (typeof optionsOrCb === "function") {
86
- this.send(command, optionsOrCb);
87
- }
88
- else if (typeof cb === "function") {
89
- if (typeof optionsOrCb !== "object")
90
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
91
- this.send(command, optionsOrCb || {}, cb);
92
- }
93
- else {
94
- return this.send(command, optionsOrCb);
95
- }
96
- }
97
- listDatabases(args, optionsOrCb, cb) {
98
- const command = new ListDatabasesCommand(args);
99
- if (typeof optionsOrCb === "function") {
100
- this.send(command, optionsOrCb);
101
- }
102
- else if (typeof cb === "function") {
103
- if (typeof optionsOrCb !== "object")
104
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
105
- this.send(command, optionsOrCb || {}, cb);
106
- }
107
- else {
108
- return this.send(command, optionsOrCb);
109
- }
110
- }
111
- listSchemas(args, optionsOrCb, cb) {
112
- const command = new ListSchemasCommand(args);
113
- if (typeof optionsOrCb === "function") {
114
- this.send(command, optionsOrCb);
115
- }
116
- else if (typeof cb === "function") {
117
- if (typeof optionsOrCb !== "object")
118
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
119
- this.send(command, optionsOrCb || {}, cb);
120
- }
121
- else {
122
- return this.send(command, optionsOrCb);
123
- }
124
- }
125
- listStatements(args, optionsOrCb, cb) {
126
- const command = new ListStatementsCommand(args);
127
- if (typeof optionsOrCb === "function") {
128
- this.send(command, optionsOrCb);
129
- }
130
- else if (typeof cb === "function") {
131
- if (typeof optionsOrCb !== "object")
132
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
133
- this.send(command, optionsOrCb || {}, cb);
134
- }
135
- else {
136
- return this.send(command, optionsOrCb);
137
- }
138
- }
139
- listTables(args, optionsOrCb, cb) {
140
- const command = new ListTablesCommand(args);
141
- if (typeof optionsOrCb === "function") {
142
- this.send(command, optionsOrCb);
143
- }
144
- else if (typeof cb === "function") {
145
- if (typeof optionsOrCb !== "object")
146
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
147
- this.send(command, optionsOrCb || {}, cb);
148
- }
149
- else {
150
- return this.send(command, optionsOrCb);
151
- }
152
- }
153
26
  }
27
+ createAggregatedClient(commands, RedshiftData);
@@ -508,7 +508,7 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
508
508
  };
509
509
  const se_BatchExecuteStatementInput = (input, context) => {
510
510
  return take(input, {
511
- ClientToken: (_) => _ ?? generateIdempotencyToken(),
511
+ ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
512
512
  ClusterIdentifier: [],
513
513
  Database: [],
514
514
  DbUser: [],
@@ -521,7 +521,7 @@ const se_BatchExecuteStatementInput = (input, context) => {
521
521
  };
522
522
  const se_ExecuteStatementInput = (input, context) => {
523
523
  return take(input, {
524
- ClientToken: (_) => _ ?? generateIdempotencyToken(),
524
+ ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
525
525
  ClusterIdentifier: [],
526
526
  Database: [],
527
527
  DbUser: [],
@@ -10,317 +10,75 @@ import { ListSchemasCommandInput, ListSchemasCommandOutput } from "./commands/Li
10
10
  import { ListStatementsCommandInput, ListStatementsCommandOutput } from "./commands/ListStatementsCommand";
11
11
  import { ListTablesCommandInput, ListTablesCommandOutput } from "./commands/ListTablesCommand";
12
12
  import { RedshiftDataClient } from "./RedshiftDataClient";
13
- /**
14
- * @public
15
- * <p>You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You
16
- * can run SQL statements, which are committed if the statement succeeds. </p>
17
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
18
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
19
- * <i>Amazon Redshift Management Guide</i>. </p>
20
- */
21
- export declare class RedshiftData extends RedshiftDataClient {
13
+ export interface RedshiftData {
22
14
  /**
23
- * @public
24
- * <p>Runs one or more SQL statements, which can be data manipulation language (DML) or data definition
25
- * language (DDL).
26
- * Depending on the authorization
27
- * method, use one of the following combinations of request parameters: </p>
28
- * <ul>
29
- * <li>
30
- * <p>Secrets Manager - when connecting to a cluster, provide the <code>secret-arn</code> of a secret
31
- * stored in Secrets Manager which has <code>username</code> and <code>password</code>.
32
- * The specified secret contains credentials
33
- * to connect to the <code>database</code> you specify.
34
- * When you are connecting to a cluster, you also supply the database name,
35
- * If you provide a cluster identifier (<code>dbClusterIdentifier</code>), it must match the cluster identifier stored in the secret.
36
- * When you are connecting to a serverless workgroup, you also supply the database name.</p>
37
- * </li>
38
- * <li>
39
- * <p>Temporary credentials - when connecting to your data warehouse, choose one of the following options:</p>
40
- * <ul>
41
- * <li>
42
- * <p>When connecting to a serverless workgroup, specify the workgroup name and database name.
43
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
44
- * Also, permission to call the <code>redshift-serverless:GetCredentials</code> operation is required.</p>
45
- * </li>
46
- * <li>
47
- * <p>When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name.
48
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
49
- * Also, permission to call the <code>redshift:GetClusterCredentialsWithIAM</code> operation is required.</p>
50
- * </li>
51
- * <li>
52
- * <p>When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name.
53
- * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.</p>
54
- * </li>
55
- * </ul>
56
- * </li>
57
- * </ul>
58
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
59
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
60
- * <i>Amazon Redshift Management Guide</i>. </p>
15
+ * @see {@link BatchExecuteStatementCommand}
61
16
  */
62
17
  batchExecuteStatement(args: BatchExecuteStatementCommandInput, options?: __HttpHandlerOptions): Promise<BatchExecuteStatementCommandOutput>;
63
18
  batchExecuteStatement(args: BatchExecuteStatementCommandInput, cb: (err: any, data?: BatchExecuteStatementCommandOutput) => void): void;
64
19
  batchExecuteStatement(args: BatchExecuteStatementCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchExecuteStatementCommandOutput) => void): void;
65
20
  /**
66
- * @public
67
- * <p>Cancels a running query. To be canceled, a query must be running. </p>
68
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
69
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
70
- * <i>Amazon Redshift Management Guide</i>. </p>
21
+ * @see {@link CancelStatementCommand}
71
22
  */
72
23
  cancelStatement(args: CancelStatementCommandInput, options?: __HttpHandlerOptions): Promise<CancelStatementCommandOutput>;
73
24
  cancelStatement(args: CancelStatementCommandInput, cb: (err: any, data?: CancelStatementCommandOutput) => void): void;
74
25
  cancelStatement(args: CancelStatementCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelStatementCommandOutput) => void): void;
75
26
  /**
76
- * @public
77
- * <p>Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information
78
- * includes when the query started, when it finished, the query status, the number of rows returned, and the SQL
79
- * statement. </p>
80
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
81
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
82
- * <i>Amazon Redshift Management Guide</i>. </p>
27
+ * @see {@link DescribeStatementCommand}
83
28
  */
84
29
  describeStatement(args: DescribeStatementCommandInput, options?: __HttpHandlerOptions): Promise<DescribeStatementCommandOutput>;
85
30
  describeStatement(args: DescribeStatementCommandInput, cb: (err: any, data?: DescribeStatementCommandOutput) => void): void;
86
31
  describeStatement(args: DescribeStatementCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeStatementCommandOutput) => void): void;
87
32
  /**
88
- * @public
89
- * <p>Describes the detailed information about a table from metadata in the cluster. The
90
- * information includes its columns.
91
- * A token is returned to page through the column list.
92
- * Depending on the authorization method, use one of the
93
- * following combinations of request parameters: </p>
94
- * <ul>
95
- * <li>
96
- * <p>Secrets Manager - when connecting to a cluster, provide the <code>secret-arn</code> of a secret
97
- * stored in Secrets Manager which has <code>username</code> and <code>password</code>.
98
- * The specified secret contains credentials
99
- * to connect to the <code>database</code> you specify.
100
- * When you are connecting to a cluster, you also supply the database name,
101
- * If you provide a cluster identifier (<code>dbClusterIdentifier</code>), it must match the cluster identifier stored in the secret.
102
- * When you are connecting to a serverless workgroup, you also supply the database name.</p>
103
- * </li>
104
- * <li>
105
- * <p>Temporary credentials - when connecting to your data warehouse, choose one of the following options:</p>
106
- * <ul>
107
- * <li>
108
- * <p>When connecting to a serverless workgroup, specify the workgroup name and database name.
109
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
110
- * Also, permission to call the <code>redshift-serverless:GetCredentials</code> operation is required.</p>
111
- * </li>
112
- * <li>
113
- * <p>When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name.
114
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
115
- * Also, permission to call the <code>redshift:GetClusterCredentialsWithIAM</code> operation is required.</p>
116
- * </li>
117
- * <li>
118
- * <p>When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name.
119
- * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.</p>
120
- * </li>
121
- * </ul>
122
- * </li>
123
- * </ul>
124
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
125
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
126
- * <i>Amazon Redshift Management Guide</i>. </p>
33
+ * @see {@link DescribeTableCommand}
127
34
  */
128
35
  describeTable(args: DescribeTableCommandInput, options?: __HttpHandlerOptions): Promise<DescribeTableCommandOutput>;
129
36
  describeTable(args: DescribeTableCommandInput, cb: (err: any, data?: DescribeTableCommandOutput) => void): void;
130
37
  describeTable(args: DescribeTableCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeTableCommandOutput) => void): void;
131
38
  /**
132
- * @public
133
- * <p>Runs an SQL statement, which can be data manipulation language (DML) or data definition
134
- * language (DDL). This statement must be a single SQL statement.
135
- * Depending on the authorization
136
- * method, use one of the following combinations of request parameters: </p>
137
- * <ul>
138
- * <li>
139
- * <p>Secrets Manager - when connecting to a cluster, provide the <code>secret-arn</code> of a secret
140
- * stored in Secrets Manager which has <code>username</code> and <code>password</code>.
141
- * The specified secret contains credentials
142
- * to connect to the <code>database</code> you specify.
143
- * When you are connecting to a cluster, you also supply the database name,
144
- * If you provide a cluster identifier (<code>dbClusterIdentifier</code>), it must match the cluster identifier stored in the secret.
145
- * When you are connecting to a serverless workgroup, you also supply the database name.</p>
146
- * </li>
147
- * <li>
148
- * <p>Temporary credentials - when connecting to your data warehouse, choose one of the following options:</p>
149
- * <ul>
150
- * <li>
151
- * <p>When connecting to a serverless workgroup, specify the workgroup name and database name.
152
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
153
- * Also, permission to call the <code>redshift-serverless:GetCredentials</code> operation is required.</p>
154
- * </li>
155
- * <li>
156
- * <p>When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name.
157
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
158
- * Also, permission to call the <code>redshift:GetClusterCredentialsWithIAM</code> operation is required.</p>
159
- * </li>
160
- * <li>
161
- * <p>When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name.
162
- * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.</p>
163
- * </li>
164
- * </ul>
165
- * </li>
166
- * </ul>
167
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
168
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
169
- * <i>Amazon Redshift Management Guide</i>. </p>
39
+ * @see {@link ExecuteStatementCommand}
170
40
  */
171
41
  executeStatement(args: ExecuteStatementCommandInput, options?: __HttpHandlerOptions): Promise<ExecuteStatementCommandOutput>;
172
42
  executeStatement(args: ExecuteStatementCommandInput, cb: (err: any, data?: ExecuteStatementCommandOutput) => void): void;
173
43
  executeStatement(args: ExecuteStatementCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ExecuteStatementCommandOutput) => void): void;
174
44
  /**
175
- * @public
176
- * <p>Fetches the temporarily cached result of an SQL statement.
177
- * A token is returned to page through the statement results. </p>
178
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
179
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
180
- * <i>Amazon Redshift Management Guide</i>. </p>
45
+ * @see {@link GetStatementResultCommand}
181
46
  */
182
47
  getStatementResult(args: GetStatementResultCommandInput, options?: __HttpHandlerOptions): Promise<GetStatementResultCommandOutput>;
183
48
  getStatementResult(args: GetStatementResultCommandInput, cb: (err: any, data?: GetStatementResultCommandOutput) => void): void;
184
49
  getStatementResult(args: GetStatementResultCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetStatementResultCommandOutput) => void): void;
185
50
  /**
186
- * @public
187
- * <p>List the databases in a cluster.
188
- * A token is returned to page through the database list.
189
- * Depending on the authorization method, use one of the
190
- * following combinations of request parameters: </p>
191
- * <ul>
192
- * <li>
193
- * <p>Secrets Manager - when connecting to a cluster, provide the <code>secret-arn</code> of a secret
194
- * stored in Secrets Manager which has <code>username</code> and <code>password</code>.
195
- * The specified secret contains credentials
196
- * to connect to the <code>database</code> you specify.
197
- * When you are connecting to a cluster, you also supply the database name,
198
- * If you provide a cluster identifier (<code>dbClusterIdentifier</code>), it must match the cluster identifier stored in the secret.
199
- * When you are connecting to a serverless workgroup, you also supply the database name.</p>
200
- * </li>
201
- * <li>
202
- * <p>Temporary credentials - when connecting to your data warehouse, choose one of the following options:</p>
203
- * <ul>
204
- * <li>
205
- * <p>When connecting to a serverless workgroup, specify the workgroup name and database name.
206
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
207
- * Also, permission to call the <code>redshift-serverless:GetCredentials</code> operation is required.</p>
208
- * </li>
209
- * <li>
210
- * <p>When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name.
211
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
212
- * Also, permission to call the <code>redshift:GetClusterCredentialsWithIAM</code> operation is required.</p>
213
- * </li>
214
- * <li>
215
- * <p>When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name.
216
- * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.</p>
217
- * </li>
218
- * </ul>
219
- * </li>
220
- * </ul>
221
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
222
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
223
- * <i>Amazon Redshift Management Guide</i>. </p>
51
+ * @see {@link ListDatabasesCommand}
224
52
  */
225
53
  listDatabases(args: ListDatabasesCommandInput, options?: __HttpHandlerOptions): Promise<ListDatabasesCommandOutput>;
226
54
  listDatabases(args: ListDatabasesCommandInput, cb: (err: any, data?: ListDatabasesCommandOutput) => void): void;
227
55
  listDatabases(args: ListDatabasesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListDatabasesCommandOutput) => void): void;
228
56
  /**
229
- * @public
230
- * <p>Lists the schemas in a database.
231
- * A token is returned to page through the schema list.
232
- * Depending on the authorization method, use one of the
233
- * following combinations of request parameters: </p>
234
- * <ul>
235
- * <li>
236
- * <p>Secrets Manager - when connecting to a cluster, provide the <code>secret-arn</code> of a secret
237
- * stored in Secrets Manager which has <code>username</code> and <code>password</code>.
238
- * The specified secret contains credentials
239
- * to connect to the <code>database</code> you specify.
240
- * When you are connecting to a cluster, you also supply the database name,
241
- * If you provide a cluster identifier (<code>dbClusterIdentifier</code>), it must match the cluster identifier stored in the secret.
242
- * When you are connecting to a serverless workgroup, you also supply the database name.</p>
243
- * </li>
244
- * <li>
245
- * <p>Temporary credentials - when connecting to your data warehouse, choose one of the following options:</p>
246
- * <ul>
247
- * <li>
248
- * <p>When connecting to a serverless workgroup, specify the workgroup name and database name.
249
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
250
- * Also, permission to call the <code>redshift-serverless:GetCredentials</code> operation is required.</p>
251
- * </li>
252
- * <li>
253
- * <p>When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name.
254
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
255
- * Also, permission to call the <code>redshift:GetClusterCredentialsWithIAM</code> operation is required.</p>
256
- * </li>
257
- * <li>
258
- * <p>When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name.
259
- * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.</p>
260
- * </li>
261
- * </ul>
262
- * </li>
263
- * </ul>
264
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
265
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
266
- * <i>Amazon Redshift Management Guide</i>. </p>
57
+ * @see {@link ListSchemasCommand}
267
58
  */
268
59
  listSchemas(args: ListSchemasCommandInput, options?: __HttpHandlerOptions): Promise<ListSchemasCommandOutput>;
269
60
  listSchemas(args: ListSchemasCommandInput, cb: (err: any, data?: ListSchemasCommandOutput) => void): void;
270
61
  listSchemas(args: ListSchemasCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSchemasCommandOutput) => void): void;
271
62
  /**
272
- * @public
273
- * <p>List of SQL statements. By default, only finished statements are shown.
274
- * A token is returned to page through the statement list. </p>
275
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
276
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
277
- * <i>Amazon Redshift Management Guide</i>. </p>
63
+ * @see {@link ListStatementsCommand}
278
64
  */
279
65
  listStatements(args: ListStatementsCommandInput, options?: __HttpHandlerOptions): Promise<ListStatementsCommandOutput>;
280
66
  listStatements(args: ListStatementsCommandInput, cb: (err: any, data?: ListStatementsCommandOutput) => void): void;
281
67
  listStatements(args: ListStatementsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListStatementsCommandOutput) => void): void;
282
68
  /**
283
- * @public
284
- * <p>List the tables in a database. If neither <code>SchemaPattern</code> nor <code>TablePattern</code> are specified, then
285
- * all tables in the database are returned.
286
- * A token is returned to page through the table list.
287
- * Depending on the authorization method, use one of the
288
- * following combinations of request parameters: </p>
289
- * <ul>
290
- * <li>
291
- * <p>Secrets Manager - when connecting to a cluster, provide the <code>secret-arn</code> of a secret
292
- * stored in Secrets Manager which has <code>username</code> and <code>password</code>.
293
- * The specified secret contains credentials
294
- * to connect to the <code>database</code> you specify.
295
- * When you are connecting to a cluster, you also supply the database name,
296
- * If you provide a cluster identifier (<code>dbClusterIdentifier</code>), it must match the cluster identifier stored in the secret.
297
- * When you are connecting to a serverless workgroup, you also supply the database name.</p>
298
- * </li>
299
- * <li>
300
- * <p>Temporary credentials - when connecting to your data warehouse, choose one of the following options:</p>
301
- * <ul>
302
- * <li>
303
- * <p>When connecting to a serverless workgroup, specify the workgroup name and database name.
304
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
305
- * Also, permission to call the <code>redshift-serverless:GetCredentials</code> operation is required.</p>
306
- * </li>
307
- * <li>
308
- * <p>When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name.
309
- * The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>.
310
- * Also, permission to call the <code>redshift:GetClusterCredentialsWithIAM</code> operation is required.</p>
311
- * </li>
312
- * <li>
313
- * <p>When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name.
314
- * Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.</p>
315
- * </li>
316
- * </ul>
317
- * </li>
318
- * </ul>
319
- * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
320
- * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
321
- * <i>Amazon Redshift Management Guide</i>. </p>
69
+ * @see {@link ListTablesCommand}
322
70
  */
323
71
  listTables(args: ListTablesCommandInput, options?: __HttpHandlerOptions): Promise<ListTablesCommandOutput>;
324
72
  listTables(args: ListTablesCommandInput, cb: (err: any, data?: ListTablesCommandOutput) => void): void;
325
73
  listTables(args: ListTablesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTablesCommandOutput) => void): void;
326
74
  }
75
+ /**
76
+ * @public
77
+ * <p>You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You
78
+ * can run SQL statements, which are committed if the statement succeeds. </p>
79
+ * <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
80
+ * <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
81
+ * <i>Amazon Redshift Management Guide</i>. </p>
82
+ */
83
+ export declare class RedshiftData extends RedshiftDataClient implements RedshiftData {
84
+ }
@@ -40,7 +40,7 @@ import {
40
40
  ListTablesCommandOutput,
41
41
  } from "./commands/ListTablesCommand";
42
42
  import { RedshiftDataClient } from "./RedshiftDataClient";
43
- export declare class RedshiftData extends RedshiftDataClient {
43
+ export interface RedshiftData {
44
44
  batchExecuteStatement(
45
45
  args: BatchExecuteStatementCommandInput,
46
46
  options?: __HttpHandlerOptions
@@ -172,3 +172,6 @@ export declare class RedshiftData extends RedshiftDataClient {
172
172
  cb: (err: any, data?: ListTablesCommandOutput) => void
173
173
  ): void;
174
174
  }
175
+ export declare class RedshiftData
176
+ extends RedshiftDataClient
177
+ implements RedshiftData {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-redshift-data",
3
3
  "description": "AWS SDK for JavaScript Redshift Data Client for Node.js, Browser and React Native",
4
- "version": "3.315.0",
4
+ "version": "3.319.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.315.0",
24
+ "@aws-sdk/client-sts": "3.319.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.315.0",
26
+ "@aws-sdk/credential-provider-node": "3.319.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -36,19 +36,19 @@
36
36
  "@aws-sdk/middleware-serde": "3.310.0",
37
37
  "@aws-sdk/middleware-signing": "3.310.0",
38
38
  "@aws-sdk/middleware-stack": "3.310.0",
39
- "@aws-sdk/middleware-user-agent": "3.310.0",
39
+ "@aws-sdk/middleware-user-agent": "3.319.0",
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.315.0",
43
+ "@aws-sdk/smithy-client": "3.316.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
51
- "@aws-sdk/util-endpoints": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
51
+ "@aws-sdk/util-endpoints": "3.319.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",
54
54
  "@aws-sdk/util-user-agent-node": "3.310.0",