pub struct ExecuteStatement<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }Expand description
Fluent builder constructing a request to ExecuteStatement.
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:
-
Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.
-
Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. Also, permission to call the
redshift:GetClusterCredentialsoperation is required. When connecting to a serverless endpoint, specify the database name.
Implementations
impl<C, M, R> ExecuteStatement<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> ExecuteStatement<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<ExecuteStatementOutput, SdkError<ExecuteStatementError>> where
R::Policy: SmithyRetryPolicy<ExecuteStatementInputOperationOutputAlias, ExecuteStatementOutput, ExecuteStatementError, ExecuteStatementInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<ExecuteStatementOutput, SdkError<ExecuteStatementError>> where
R::Policy: SmithyRetryPolicy<ExecuteStatementInputOperationOutputAlias, ExecuteStatementOutput, ExecuteStatementError, ExecuteStatementInputOperationRetryAlias>,
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.
The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.
The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
Appends an item to Parameters.
To override the contents of this collection use set_parameters.
The parameters for the SQL statement.
The parameters for the SQL statement.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for ExecuteStatement<C, M, R>
impl<C, M, R> Send for ExecuteStatement<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for ExecuteStatement<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for ExecuteStatement<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for ExecuteStatement<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more