Interface BatchExecuteStatementRequest.Builder

  • Method Details

    • sqls

      One or more SQL statements to run. The SQL statements run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. By default, the SQL statements are run as a single transaction. If any SQL statement fails, all work is rolled back. To change this behavior, see the ExecutionMode parameter.

      Parameters:
      sqls - One or more SQL statements to run. The SQL statements run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. By default, the SQL statements are run as a single transaction. If any SQL statement fails, all work is rolled back. To change this behavior, see the ExecutionMode parameter.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sqls

      One or more SQL statements to run. The SQL statements run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. By default, the SQL statements are run as a single transaction. If any SQL statement fails, all work is rolled back. To change this behavior, see the ExecutionMode parameter.

      Parameters:
      sqls - One or more SQL statements to run. The SQL statements run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. By default, the SQL statements are run as a single transaction. If any SQL statement fails, all work is rolled back. To change this behavior, see the ExecutionMode parameter.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • clusterIdentifier

      BatchExecuteStatementRequest.Builder clusterIdentifier(String clusterIdentifier)

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

      Parameters:
      clusterIdentifier - The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • secretArn

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

      Parameters:
      secretArn - The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dbUser

      The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.

      Parameters:
      dbUser - The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • database

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

      Parameters:
      database - The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withEvent

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

      Parameters:
      withEvent - A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • statementName

      BatchExecuteStatementRequest.Builder statementName(String statementName)

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

      Parameters:
      statementName - The name of the SQL statements. You can name the SQL statements when you create them to identify the query.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • parameters

      The parameters for the SQL statements. The parameters are available to all SQL statements in the batch. Each statement can reference any subset of the provided parameters. Each provided parameter must be referenced by at least one SQL statement in the batch.

      Parameters:
      parameters - The parameters for the SQL statements. The parameters are available to all SQL statements in the batch. Each statement can reference any subset of the provided parameters. Each provided parameter must be referenced by at least one SQL statement in the batch.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • parameters

      The parameters for the SQL statements. The parameters are available to all SQL statements in the batch. Each statement can reference any subset of the provided parameters. Each provided parameter must be referenced by at least one SQL statement in the batch.

      Parameters:
      parameters - The parameters for the SQL statements. The parameters are available to all SQL statements in the batch. Each statement can reference any subset of the provided parameters. Each provided parameter must be referenced by at least one SQL statement in the batch.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • parameters

      The parameters for the SQL statements. The parameters are available to all SQL statements in the batch. Each statement can reference any subset of the provided parameters. Each provided parameter must be referenced by at least one SQL statement in the batch.

      This is a convenience method that creates an instance of the SqlParameter.Builder avoiding the need to create one manually via SqlParameter.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to parameters(List<SqlParameter>).

      Parameters:
      parameters - a consumer that will call methods on SqlParameter.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • workgroupName

      BatchExecuteStatementRequest.Builder workgroupName(String workgroupName)

      The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.

      Parameters:
      workgroupName - The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • clientToken

      BatchExecuteStatementRequest.Builder clientToken(String clientToken)

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

      Parameters:
      clientToken - A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resultFormat

      BatchExecuteStatementRequest.Builder resultFormat(String resultFormat)

      The data format of the result of the SQL statement. If no format is specified, the default is JSON.

      Parameters:
      resultFormat - The data format of the result of the SQL statement. If no format is specified, the default is JSON.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • resultFormat

      The data format of the result of the SQL statement. If no format is specified, the default is JSON.

      Parameters:
      resultFormat - The data format of the result of the SQL statement. If no format is specified, the default is JSON.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • sessionKeepAliveSeconds

      BatchExecuteStatementRequest.Builder sessionKeepAliveSeconds(Integer sessionKeepAliveSeconds)

      The number of seconds to keep the session alive after the query finishes. The maximum time a session can keep alive is 24 hours. After 24 hours, the session is forced closed and the query is terminated.

      Parameters:
      sessionKeepAliveSeconds - The number of seconds to keep the session alive after the query finishes. The maximum time a session can keep alive is 24 hours. After 24 hours, the session is forced closed and the query is terminated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionId

      The session identifier of the query.

      Parameters:
      sessionId - The session identifier of the query.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • executionMode

      BatchExecuteStatementRequest.Builder executionMode(String executionMode)

      Determines how the SQL statements in the batch are run. If set to TRANSACTION (the default), all SQL statements are run as a single transaction and they are committed or rolled back together. If set to AUTO_COMMIT, each SQL statement is committed individually, and a failure of one statement does not affect the others.

      Parameters:
      executionMode - Determines how the SQL statements in the batch are run. If set to TRANSACTION (the default), all SQL statements are run as a single transaction and they are committed or rolled back together. If set to AUTO_COMMIT, each SQL statement is committed individually, and a failure of one statement does not affect the others.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • executionMode

      Determines how the SQL statements in the batch are run. If set to TRANSACTION (the default), all SQL statements are run as a single transaction and they are committed or rolled back together. If set to AUTO_COMMIT, each SQL statement is committed individually, and a failure of one statement does not affect the others.

      Parameters:
      executionMode - Determines how the SQL statements in the batch are run. If set to TRANSACTION (the default), all SQL statements are run as a single transaction and they are committed or rolled back together. If set to AUTO_COMMIT, each SQL statement is committed individually, and a failure of one statement does not affect the others.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • waitTimeSeconds

      BatchExecuteStatementRequest.Builder waitTimeSeconds(Integer waitTimeSeconds)

      The number of seconds to wait for all SQL statements in the batch to complete execution before returning the response. If the SQL statements do not complete within the specified time, the response returns the current status. The maximum value is 30 seconds.

      Parameters:
      waitTimeSeconds - The number of seconds to wait for all SQL statements in the batch to complete execution before returning the response. If the SQL statements do not complete within the specified time, the response returns the current status. The maximum value is 30 seconds.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      BatchExecuteStatementRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.