aws_sdk_redshiftdata/client/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 [`ExecuteStatement`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`sql(impl Into<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::sql) / [`set_sql(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::set_sql):<br>required: **true**<br><p>The SQL statement text to run.</p><br>
7 /// - [`cluster_identifier(impl Into<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::cluster_identifier) / [`set_cluster_identifier(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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::execute_statement::builders::ExecuteStatementFluentBuilder::secret_arn) / [`set_secret_arn(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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::execute_statement::builders::ExecuteStatementFluentBuilder::db_user) / [`set_db_user(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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::execute_statement::builders::ExecuteStatementFluentBuilder::database) / [`set_database(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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::execute_statement::builders::ExecuteStatementFluentBuilder::with_event) / [`set_with_event(Option<bool>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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 statement runs.</p><br>
12 /// - [`statement_name(impl Into<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::statement_name) / [`set_statement_name(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::set_statement_name):<br>required: **false**<br><p>The name of the SQL statement. You can name the SQL statement when you create it to identify the query.</p><br>
13 /// - [`parameters(SqlParameter)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::parameters) / [`set_parameters(Option<Vec::<SqlParameter>>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::set_parameters):<br>required: **false**<br><p>The parameters for the SQL statement.</p><br>
14 /// - [`workgroup_name(impl Into<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::workgroup_name) / [`set_workgroup_name(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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>
15 /// - [`client_token(impl Into<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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>
16 /// - [`session_keep_alive_seconds(i32)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::session_keep_alive_seconds) / [`set_session_keep_alive_seconds(Option<i32>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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>
17 /// - [`session_id(impl Into<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::session_id) / [`set_session_id(Option<String>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::set_session_id):<br>required: **false**<br><p>The session identifier of the query.</p><br>
18 /// - [`result_format(ResultFormatString)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::result_format) / [`set_result_format(Option<ResultFormatString>)`](crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::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>
19 /// - On success, responds with [`ExecuteStatementOutput`](crate::operation::execute_statement::ExecuteStatementOutput) with field(s):
20 /// - [`id(Option<String>)`](crate::operation::execute_statement::ExecuteStatementOutput::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.</p>
21 /// - [`created_at(Option<DateTime>)`](crate::operation::execute_statement::ExecuteStatementOutput::created_at): <p>The date and time (UTC) the statement was created.</p>
22 /// - [`cluster_identifier(Option<String>)`](crate::operation::execute_statement::ExecuteStatementOutput::cluster_identifier): <p>The cluster identifier. This element is not returned when connecting to a serverless workgroup.</p>
23 /// - [`db_user(Option<String>)`](crate::operation::execute_statement::ExecuteStatementOutput::db_user): <p>The database user name.</p>
24 /// - [`db_groups(Option<Vec::<String>>)`](crate::operation::execute_statement::ExecuteStatementOutput::db_groups): <p>A list of colon (:) separated names of database groups.</p>
25 /// - [`database(Option<String>)`](crate::operation::execute_statement::ExecuteStatementOutput::database): <p>The name of the database.</p>
26 /// - [`secret_arn(Option<String>)`](crate::operation::execute_statement::ExecuteStatementOutput::secret_arn): <p>The name or ARN of the secret that enables access to the database.</p>
27 /// - [`workgroup_name(Option<String>)`](crate::operation::execute_statement::ExecuteStatementOutput::workgroup_name): <p>The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.</p>
28 /// - [`session_id(Option<String>)`](crate::operation::execute_statement::ExecuteStatementOutput::session_id): <p>The session identifier of the query.</p>
29 /// - On failure, responds with [`SdkError<ExecuteStatementError>`](crate::operation::execute_statement::ExecuteStatementError)
30 pub fn execute_statement(&self) -> crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder {
31 crate::operation::execute_statement::builders::ExecuteStatementFluentBuilder::new(self.handle.clone())
32 }
33}