import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ExecuteStatementInput, ExecuteStatementOutput } from "../models/models_0"; import type { RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftDataClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link ExecuteStatementCommand}. */ export interface ExecuteStatementCommandInput extends ExecuteStatementInput { } /** * @public * * The output of {@link ExecuteStatementCommand}. */ export interface ExecuteStatementCommandOutput extends ExecuteStatementOutput, __MetadataBearer { } declare const ExecuteStatementCommand_base: { new (input: ExecuteStatementCommandInput): import("@smithy/core/client").CommandImpl; new (input: ExecuteStatementCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters:

For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RedshiftDataClient, ExecuteStatementCommand } from "@aws-sdk/client-redshift-data"; // ES Modules import * // const { RedshiftDataClient, ExecuteStatementCommand } = require("@aws-sdk/client-redshift-data"); // CommonJS import * // import type { RedshiftDataClientConfig } from "@aws-sdk/client-redshift-data"; * const config = {}; // type is RedshiftDataClientConfig * const client = new RedshiftDataClient(config); * const input = { // ExecuteStatementInput * Sql: "STRING_VALUE", // required * ClusterIdentifier: "STRING_VALUE", * SecretArn: "STRING_VALUE", * DbUser: "STRING_VALUE", * Database: "STRING_VALUE", * WithEvent: true || false, * StatementName: "STRING_VALUE", * Parameters: [ // SqlParametersList * { // SqlParameter * name: "STRING_VALUE", // required * value: "STRING_VALUE", // required * }, * ], * WorkgroupName: "STRING_VALUE", * ClientToken: "STRING_VALUE", * ResultFormat: "STRING_VALUE", * SessionKeepAliveSeconds: Number("int"), * SessionId: "STRING_VALUE", * }; * const command = new ExecuteStatementCommand(input); * const response = await client.send(command); * // { // ExecuteStatementOutput * // Id: "STRING_VALUE", * // CreatedAt: new Date("TIMESTAMP"), * // ClusterIdentifier: "STRING_VALUE", * // DbUser: "STRING_VALUE", * // DbGroups: [ // DbGroupList * // "STRING_VALUE", * // ], * // Database: "STRING_VALUE", * // SecretArn: "STRING_VALUE", * // WorkgroupName: "STRING_VALUE", * // SessionId: "STRING_VALUE", * // }; * * ``` * * @param ExecuteStatementCommandInput - {@link ExecuteStatementCommandInput} * @returns {@link ExecuteStatementCommandOutput} * @see {@link ExecuteStatementCommandInput} for command's `input` shape. * @see {@link ExecuteStatementCommandOutput} for command's `response` shape. * @see {@link RedshiftDataClientResolvedConfig | config} for RedshiftDataClient's `config` shape. * * @throws {@link ActiveSessionsExceededException} (client fault) *

The Amazon Redshift Data API operation failed because the maximum number of active sessions exceeded.

* * @throws {@link ActiveStatementsExceededException} (client fault) *

The number of active statements exceeds the limit.

* * @throws {@link ExecuteStatementException} (server fault) *

The SQL statement encountered an environmental error while running.

* * @throws {@link InternalServerException} (server fault) *

The Amazon Redshift Data API operation failed due to invalid input.

* * @throws {@link ResourceNotFoundException} (client fault) *

The Amazon Redshift Data API operation failed due to a missing resource.

* * @throws {@link ValidationException} (client fault) *

The Amazon Redshift Data API operation failed due to invalid input.

* * @throws {@link RedshiftDataServiceException} *

Base exception class for all service exceptions from RedshiftData service.

* * * @public */ export declare class ExecuteStatementCommand extends ExecuteStatementCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ExecuteStatementInput; output: ExecuteStatementOutput; }; sdk: { input: ExecuteStatementCommandInput; output: ExecuteStatementCommandOutput; }; }; }