aws_sdk_redshiftdata/client/
batch_execute_statement.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`BatchExecuteStatement`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`sqls(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::sqls) / [`set_sqls(Option<Vec::<String>>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_sqls):<br>required: **true**<br><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><br>
7    ///   - [`cluster_identifier(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::cluster_identifier) / [`set_cluster_identifier(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_cluster_identifier):<br>required: **false**<br><p>The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.</p><br>
8    ///   - [`secret_arn(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::secret_arn) / [`set_secret_arn(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_secret_arn):<br>required: **false**<br><p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.</p><br>
9    ///   - [`db_user(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::db_user) / [`set_db_user(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_db_user):<br>required: **false**<br><p>The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.</p><br>
10    ///   - [`database(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::database) / [`set_database(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_database):<br>required: **false**<br><p>The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.</p><br>
11    ///   - [`with_event(bool)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::with_event) / [`set_with_event(Option<bool>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_with_event):<br>required: **false**<br><p>A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run.</p><br>
12    ///   - [`statement_name(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::statement_name) / [`set_statement_name(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_statement_name):<br>required: **false**<br><p>The name of the SQL statements. You can name the SQL statements when you create them to identify the query.</p><br>
13    ///   - [`workgroup_name(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::workgroup_name) / [`set_workgroup_name(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_workgroup_name):<br>required: **false**<br><p>The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.</p><br>
14    ///   - [`client_token(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p><br>
15    ///   - [`session_keep_alive_seconds(i32)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::session_keep_alive_seconds) / [`set_session_keep_alive_seconds(Option<i32>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_session_keep_alive_seconds):<br>required: **false**<br><p>The number of seconds to keep the session alive after the query finishes. The maximum time a session can keep alive is 24 hours. After 24 hours, the session is forced closed and the query is terminated.</p><br>
16    ///   - [`session_id(impl Into<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::session_id) / [`set_session_id(Option<String>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_session_id):<br>required: **false**<br><p>The session identifier of the query.</p><br>
17    ///   - [`result_format(ResultFormatString)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::result_format) / [`set_result_format(Option<ResultFormatString>)`](crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::set_result_format):<br>required: **false**<br><p>The data format of the result of the SQL statement. If no format is specified, the default is JSON.</p><br>
18    /// - On success, responds with [`BatchExecuteStatementOutput`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput) with field(s):
19    ///   - [`id(Option<String>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::id): <p>The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by <code>BatchExecuteStatment</code>.</p>
20    ///   - [`created_at(Option<DateTime>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::created_at): <p>The date and time (UTC) the statement was created.</p>
21    ///   - [`cluster_identifier(Option<String>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::cluster_identifier): <p>The cluster identifier. This element is not returned when connecting to a serverless workgroup.</p>
22    ///   - [`db_user(Option<String>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::db_user): <p>The database user name.</p>
23    ///   - [`db_groups(Option<Vec::<String>>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::db_groups): <p>A list of colon (:) separated names of database groups.</p>
24    ///   - [`database(Option<String>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::database): <p>The name of the database.</p>
25    ///   - [`secret_arn(Option<String>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::secret_arn): <p>The name or ARN of the secret that enables access to the database.</p>
26    ///   - [`workgroup_name(Option<String>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::workgroup_name): <p>The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.</p>
27    ///   - [`session_id(Option<String>)`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput::session_id): <p>The session identifier of the query.</p>
28    /// - On failure, responds with [`SdkError<BatchExecuteStatementError>`](crate::operation::batch_execute_statement::BatchExecuteStatementError)
29    pub fn batch_execute_statement(&self) -> crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder {
30        crate::operation::batch_execute_statement::builders::BatchExecuteStatementFluentBuilder::new(self.handle.clone())
31    }
32}