Skip to main content

aws_sdk_context/client/
execute_sql.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 [`ExecuteSql`](crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`agent_context_id(impl Into<String>)`](crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder::agent_context_id) / [`set_agent_context_id(Option<String>)`](crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder::set_agent_context_id):<br>required: **true**<br><p>The agent context that owns the connection, by ID or full ARN.</p><br>
7    ///   - [`connection_id(impl Into<String>)`](crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder::connection_id) / [`set_connection_id(Option<String>)`](crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder::set_connection_id):<br>required: **true**<br><p>The connection to run against. Must be a GLUE_DATA_CATALOG connection linked to the agent context. Its access configuration (<code>accessConfig</code>) determines how AWS Context reads the tables.</p><br>
8    ///   - [`query(SqlDataQuery)`](crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder::query) / [`set_query(Option<SqlDataQuery>)`](crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder::set_query):<br>required: **true**<br><p>The query to run: a SQL statement and the AWS Glue tables that it reads. For the SQL rules and limits, see <code>SqlQuery</code>.</p><br>
9    /// - On success, responds with [`ExecuteSqlOutput`](crate::operation::execute_sql::ExecuteSqlOutput) with field(s):
10    ///   - [`column_metadata(Vec::<SqlColumnMetadata>)`](crate::operation::execute_sql::ExecuteSqlOutput::column_metadata): <p>One entry per result column, in result order. <code>rows\[i\].values\[j\]</code> is the value of <code>columnMetadata\[j\]</code>.</p>
11    ///   - [`rows(Vec::<SqlRow>)`](crate::operation::execute_sql::ExecuteSqlOutput::rows): <p>The result rows, in result order. Each row holds a positional list of typed values, one per column.</p>
12    /// - On failure, responds with [`SdkError<ExecuteSqlError>`](crate::operation::execute_sql::ExecuteSqlError)
13    pub fn execute_sql(&self) -> crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder {
14        crate::operation::execute_sql::builders::ExecuteSqlFluentBuilder::new(self.handle.clone())
15    }
16}