Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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 - 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 workgroup, 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:GetClusterCredentials
operation is required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, permission to call theredshift-serverless:GetCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
Synopsis
- data BatchExecuteStatement = BatchExecuteStatement' {}
- newBatchExecuteStatement :: Text -> NonEmpty Text -> BatchExecuteStatement
- batchExecuteStatement_clientToken :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_clusterIdentifier :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_dbUser :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_secretArn :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_statementName :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_withEvent :: Lens' BatchExecuteStatement (Maybe Bool)
- batchExecuteStatement_workgroupName :: Lens' BatchExecuteStatement (Maybe Text)
- batchExecuteStatement_database :: Lens' BatchExecuteStatement Text
- batchExecuteStatement_sqls :: Lens' BatchExecuteStatement (NonEmpty Text)
- data BatchExecuteStatementResponse = BatchExecuteStatementResponse' {}
- newBatchExecuteStatementResponse :: Int -> BatchExecuteStatementResponse
- batchExecuteStatementResponse_clusterIdentifier :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_createdAt :: Lens' BatchExecuteStatementResponse (Maybe UTCTime)
- batchExecuteStatementResponse_database :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_dbUser :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_id :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_secretArn :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_workgroupName :: Lens' BatchExecuteStatementResponse (Maybe Text)
- batchExecuteStatementResponse_httpStatus :: Lens' BatchExecuteStatementResponse Int
Creating a Request
data BatchExecuteStatement Source #
See: newBatchExecuteStatement
smart constructor.
BatchExecuteStatement' | |
|
Instances
newBatchExecuteStatement Source #
:: 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:clientToken:BatchExecuteStatement'
, batchExecuteStatement_clientToken
- A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
BatchExecuteStatement
, batchExecuteStatement_clusterIdentifier
- The cluster identifier. This parameter is required when connecting to a
cluster and authenticating using either Secrets Manager or temporary
credentials.
BatchExecuteStatement
, batchExecuteStatement_dbUser
- The database user name. This parameter is required when connecting to a
cluster and authenticating using temporary credentials.
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.
BatchExecuteStatement
, batchExecuteStatement_statementName
- The name of the SQL statements. You can name the SQL statements when you
create them to identify the query.
$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.
BatchExecuteStatement
, batchExecuteStatement_workgroupName
- The serverless workgroup name. This parameter is required when
connecting to a serverless workgroup and authenticating using either
Secrets Manager or temporary credentials.
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.
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>
Request Lenses
batchExecuteStatement_clientToken :: Lens' BatchExecuteStatement (Maybe Text) Source #
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
batchExecuteStatement_clusterIdentifier :: Lens' BatchExecuteStatement (Maybe Text) Source #
The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
batchExecuteStatement_dbUser :: Lens' BatchExecuteStatement (Maybe Text) Source #
The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.
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_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_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_workgroupName :: Lens' BatchExecuteStatement (Maybe Text) Source #
The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and 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.
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>
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:
BatchExecuteStatement
, batchExecuteStatementResponse_clusterIdentifier
- The cluster identifier. This element is not returned when connecting to
a serverless workgroup.
BatchExecuteStatementResponse
, batchExecuteStatementResponse_createdAt
- The date and time (UTC) the statement was created.
BatchExecuteStatement
, batchExecuteStatementResponse_database
- The name of the database.
BatchExecuteStatement
, batchExecuteStatementResponse_dbUser
- The database user name.
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
.
BatchExecuteStatement
, batchExecuteStatementResponse_secretArn
- The name or ARN of the secret that enables access to the database.
BatchExecuteStatement
, batchExecuteStatementResponse_workgroupName
- The serverless workgroup name. This element is not returned when
connecting to a provisioned cluster.
$sel:httpStatus:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_httpStatus
- The response's http status code.
Response Lenses
batchExecuteStatementResponse_clusterIdentifier :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The cluster identifier. This element is not returned when connecting to a serverless workgroup.
batchExecuteStatementResponse_createdAt :: Lens' BatchExecuteStatementResponse (Maybe UTCTime) Source #
The date and time (UTC) the statement was created.
batchExecuteStatementResponse_database :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The name of the database.
batchExecuteStatementResponse_dbUser :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The database user name.
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_workgroupName :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #
The serverless workgroup name. This element is not returned when connecting to a provisioned cluster.
batchExecuteStatementResponse_httpStatus :: Lens' BatchExecuteStatementResponse Int Source #
The response's http status code.