Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters:
- Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
- Temporary credentials - specify the cluster identifier, the database
name, and the database user name. Permission to call the
redshift:GetClusterCredentials
operation is required to use this method.
Synopsis
- data BatchExecuteStatement = BatchExecuteStatement' {}
- newBatchExecuteStatement :: Text -> Text -> NonEmpty Text -> BatchExecuteStatement
- batchExecuteStatement_dbUser :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_statementName :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_secretArn :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_withEvent :: Lens' BatchExecuteStatement (Maybe Bool)
- batchExecuteStatement_clusterIdentifier :: Lens' BatchExecuteStatement Text
- batchExecuteStatement_database :: Lens' BatchExecuteStatement Text
- batchExecuteStatement_sqls :: Lens' BatchExecuteStatement (NonEmpty Text)
- data BatchExecuteStatementResponse = BatchExecuteStatementResponse' {}
- newBatchExecuteStatementResponse :: Int -> BatchExecuteStatementResponse
- batchExecuteStatementResponse_dbUser :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_database :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_createdAt :: Lens' BatchExecuteStatementResponse (Maybe UTCTime)
- batchExecuteStatementResponse_clusterIdentifier :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_id :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_secretArn :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_httpStatus :: Lens' BatchExecuteStatementResponse Int
Creating a Request
data BatchExecuteStatement Source #
See: newBatchExecuteStatement
smart constructor.
BatchExecuteStatement' | |
|
Instances
newBatchExecuteStatement Source #
:: Text | |
-> Text | |
-> NonEmpty Text | |
-> BatchExecuteStatement |
Create a value of BatchExecuteStatement
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:BatchExecuteStatement'
, batchExecuteStatement_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:statementName:BatchExecuteStatement'
, batchExecuteStatement_statementName
- The name of the SQL statements. You can name the SQL statements when you
create them to identify the query.
$sel:secretArn:BatchExecuteStatement'
, batchExecuteStatement_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:withEvent:BatchExecuteStatement'
, batchExecuteStatement_withEvent
- A value that indicates whether to send an event to the Amazon
EventBridge event bus after the SQL statements run.
$sel:clusterIdentifier:BatchExecuteStatement'
, batchExecuteStatement_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:BatchExecuteStatement'
, batchExecuteStatement_database
- The name of the database. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:sqls:BatchExecuteStatement'
, batchExecuteStatement_sqls
- One or more SQL statements to run.
Request Lenses
batchExecuteStatement_dbUser :: Lens' BatchExecuteStatement (Maybe Text) Source #
The database user name. This parameter is required when authenticating using temporary credentials.
batchExecuteStatement_statementName :: Lens' BatchExecuteStatement (Maybe Text) Source #
The name of the SQL statements. You can name the SQL statements when you create them to identify the query.
batchExecuteStatement_secretArn :: Lens' BatchExecuteStatement (Maybe Text) Source #
The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
batchExecuteStatement_withEvent :: Lens' BatchExecuteStatement (Maybe Bool) Source #
A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run.
batchExecuteStatement_clusterIdentifier :: Lens' BatchExecuteStatement Text Source #
The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
batchExecuteStatement_database :: Lens' BatchExecuteStatement Text Source #
The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
batchExecuteStatement_sqls :: Lens' BatchExecuteStatement (NonEmpty Text) Source #
One or more SQL statements to run.
Destructuring the Response
data BatchExecuteStatementResponse Source #
See: newBatchExecuteStatementResponse
smart constructor.
BatchExecuteStatementResponse' | |
|
Instances
newBatchExecuteStatementResponse Source #
Create a value of BatchExecuteStatementResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:BatchExecuteStatement'
, batchExecuteStatementResponse_dbUser
- The database user name.
$sel:database:BatchExecuteStatement'
, batchExecuteStatementResponse_database
- The name of the database.
$sel:createdAt:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_createdAt
- The date and time (UTC) the statement was created.
$sel:clusterIdentifier:BatchExecuteStatement'
, batchExecuteStatementResponse_clusterIdentifier
- The cluster identifier.
$sel:id:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_id
- 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
BatchExecuteStatment
.
$sel:secretArn:BatchExecuteStatement'
, batchExecuteStatementResponse_secretArn
- The name or ARN of the secret that enables access to the database.
$sel:httpStatus:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_httpStatus
- The response's http status code.
Response Lenses
batchExecuteStatementResponse_dbUser :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The database user name.
batchExecuteStatementResponse_database :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The name of the database.
batchExecuteStatementResponse_createdAt :: Lens' BatchExecuteStatementResponse (Maybe UTCTime) Source #
The date and time (UTC) the statement was created.
batchExecuteStatementResponse_clusterIdentifier :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The cluster identifier.
batchExecuteStatementResponse_id :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
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
BatchExecuteStatment
.
batchExecuteStatementResponse_secretArn :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The name or ARN of the secret that enables access to the database.
batchExecuteStatementResponse_httpStatus :: Lens' BatchExecuteStatementResponse Int Source #
The response's http status code.