Resource: awsRedshiftdataStatement
Executes a Redshift Data Statement.
Example Usage
clusterIdentifier
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.redshiftdataStatement.RedshiftdataStatement(this, "example", {
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;",
});
workgroupName
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.redshiftdataStatement.RedshiftdataStatement(this, "example", {
database: "dev",
sql: "CREATE GROUP group_name;",
workgroupName: "${aws_redshiftserverless_workgroup.example.workgroup_name}",
});
Argument Reference
The following arguments are required:
database
- (Required) The name of the database.sql
- (Required) The SQL statement text to run.
The following arguments are optional:
clusterIdentifier
- (Optional) The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.dbUser
- (Optional) The database user name.secretArn
- (Optional) The name or ARN of the secret that enables access to the database.statementName
- (Optional) The name of the SQL statement. You can name the SQL statement when you create it to identify the query.withEvent
- (Optional) A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.workgroupName
- (Optional) The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The Redshift Data Statement ID.
Import
Redshift Data Statements can be imported using the id
, e.g.,