Package com.pulumi.aws.redshiftdata
Class Statement
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.redshiftdata.Statement
-
public class Statement extends com.pulumi.resources.CustomResourceExecutes a Redshift Data Statement. ## Example Usage ### clusterIdentifier
### workgroupNamepackage 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.ArrayList; import java.util.Arrays; 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(exampleAwsRedshiftCluster.clusterIdentifier()) .database(exampleAwsRedshiftCluster.databaseName()) .dbUser(exampleAwsRedshiftCluster.masterUsername()) .sql("CREATE GROUP group_name;") .build()); } }
## Import Using `pulumi import`, import Redshift Data Statements using the `id`. For example: ```sh $ pulumi import aws:redshiftdata/statement:Statement example example ```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.ArrayList; import java.util.Arrays; 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(exampleAwsRedshiftserverlessWorkgroup.workgroupName()) .database("dev") .sql("CREATE GROUP group_name;") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Statement(java.lang.String name)Statement(java.lang.String name, StatementArgs args)Statement(java.lang.String name, StatementArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.String>>clusterIdentifier()com.pulumi.core.Output<java.lang.String>database()com.pulumi.core.Output<java.util.Optional<java.lang.String>>dbUser()static Statementget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, StatementState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.util.List<StatementParameter>>>parameters()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.String>>secretArn()com.pulumi.core.Output<java.lang.String>sql()com.pulumi.core.Output<java.util.Optional<java.lang.String>>statementName()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>withEvent()com.pulumi.core.Output<java.util.Optional<java.lang.String>>workgroupName()
-
-
-
Constructor Detail
-
Statement
public Statement(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Statement
public Statement(java.lang.String name, StatementArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Statement
public Statement(java.lang.String name, StatementArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
clusterIdentifier
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> clusterIdentifier()
- Returns:
- The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
-
database
public com.pulumi.core.Output<java.lang.String> database()
- Returns:
- The name of the database.
-
dbUser
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> dbUser()
- Returns:
- The database user name.
-
parameters
public com.pulumi.core.Output<java.util.Optional<java.util.List<StatementParameter>>> parameters()
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
secretArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> secretArn()
- Returns:
- The name or ARN of the secret that enables access to the database.
-
sql
public com.pulumi.core.Output<java.lang.String> sql()
- Returns:
- The SQL statement text to run. The following arguments are optional:
-
statementName
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> statementName()
- Returns:
- The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
-
withEvent
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> withEvent()
- Returns:
- A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
-
workgroupName
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> workgroupName()
- Returns:
- The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
-
get
public static Statement get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable StatementState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-