Statement

class Statement : KotlinCustomResource

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

Properties

Link copied to clipboard

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>

The name of the database.

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

The database user name.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val secretArn: Output<String>?

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

Link copied to clipboard
val sql: Output<String>

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

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

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 urn: Output<String>
Link copied to clipboard
val withEvent: Output<Boolean>?

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>?

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