StatementArgs

data class StatementArgs(val clusterIdentifier: Output<String>? = null, val database: Output<String>? = null, val dbUser: Output<String>? = null, val parameters: Output<List<StatementParameterArgs>>? = null, val secretArn: Output<String>? = null, val sql: Output<String>? = null, val statementName: Output<String>? = null, val withEvent: Output<Boolean>? = null, val workgroupName: Output<String>? = null) : ConvertibleToJava<StatementArgs>

Executes a Redshift Data Statement.

Example Usage

cluster_identifier

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.redshiftdata.Statement;
import com.pulumi.aws.redshiftdata.StatementArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Statement("example", StatementArgs.builder()
.clusterIdentifier(aws_redshift_cluster.example().cluster_identifier())
.database(aws_redshift_cluster.example().database_name())
.dbUser(aws_redshift_cluster.example().master_username())
.sql("CREATE GROUP group_name;")
.build());
}
}

workgroup_name

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.redshiftdata.Statement;
import com.pulumi.aws.redshiftdata.StatementArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Statement("example", StatementArgs.builder()
.workgroupName(aws_redshiftserverless_workgroup.example().workgroup_name())
.database("dev")
.sql("CREATE GROUP group_name;")
.build());
}
}

Import

Redshift Data Statements can be imported using the id, e.g.,

$ pulumi import aws:redshiftdata/statement:Statement example example

Constructors

Link copied to clipboard
constructor(clusterIdentifier: Output<String>? = null, database: Output<String>? = null, dbUser: Output<String>? = null, parameters: Output<List<StatementParameterArgs>>? = null, secretArn: Output<String>? = null, sql: Output<String>? = null, statementName: Output<String>? = null, withEvent: Output<Boolean>? = null, workgroupName: Output<String>? = null)

Properties

Link copied to clipboard
val clusterIdentifier: Output<String>? = null

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

Link copied to clipboard
val database: Output<String>? = null

The name of the database.

Link copied to clipboard
val dbUser: Output<String>? = null

The database user name.

Link copied to clipboard
val parameters: Output<List<StatementParameterArgs>>? = null
Link copied to clipboard
val secretArn: Output<String>? = null

The name or ARN of the secret that enables access to the database.

Link copied to clipboard
val sql: Output<String>? = null

The SQL statement text to run. The following arguments are optional:

Link copied to clipboard
val statementName: Output<String>? = null

The name of the SQL statement. You can name the SQL statement when you create it to identify the query.

Link copied to clipboard
val withEvent: Output<Boolean>? = null

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

Link copied to clipboard
val workgroupName: Output<String>? = null

The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.

Functions

Link copied to clipboard
open override fun toJava(): StatementArgs