libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.RedshiftData.BatchExecuteStatement

Description

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

Creating a Request

data BatchExecuteStatement Source #

See: newBatchExecuteStatement smart constructor.

Constructors

BatchExecuteStatement' 

Fields

  • dbUser :: Maybe Text

    The database user name. This parameter is required when authenticating using temporary credentials.

  • statementName :: Maybe Text

    The name of the SQL statements. You can name the SQL statements when you create them to identify the query.

  • secretArn :: Maybe Text

    The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

  • withEvent :: Maybe Bool

    A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run.

  • clusterIdentifier :: Text

    The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

  • database :: Text

    The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

  • sqls :: NonEmpty Text

    One or more SQL statements to run.

Instances

Instances details
Eq BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Read BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Show BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Generic BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Associated Types

type Rep BatchExecuteStatement :: Type -> Type #

NFData BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Methods

rnf :: BatchExecuteStatement -> () #

Hashable BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

ToJSON BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

AWSRequest BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Associated Types

type AWSResponse BatchExecuteStatement #

ToHeaders BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

ToPath BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

ToQuery BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

type Rep BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

type Rep BatchExecuteStatement = D1 ('MetaData "BatchExecuteStatement" "Amazonka.RedshiftData.BatchExecuteStatement" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "BatchExecuteStatement'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dbUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "statementName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "secretArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "withEvent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "clusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sqls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text))))))
type AWSResponse BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

newBatchExecuteStatement Source #

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.

Destructuring the Response

data BatchExecuteStatementResponse Source #

See: newBatchExecuteStatementResponse smart constructor.

Constructors

BatchExecuteStatementResponse' 

Fields

Instances

Instances details
Eq BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Read BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Show BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Generic BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

Associated Types

type Rep BatchExecuteStatementResponse :: Type -> Type #

NFData BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

type Rep BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.BatchExecuteStatement

type Rep BatchExecuteStatementResponse = D1 ('MetaData "BatchExecuteStatementResponse" "Amazonka.RedshiftData.BatchExecuteStatement" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "BatchExecuteStatementResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dbUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "createdAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: ((S1 ('MetaSel ('Just "clusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "secretArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

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_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.