Documentation
¶
Index ¶
- type Statement
- type StatementArgs
- type StatementArray
- type StatementArrayInput
- type StatementArrayOutput
- func (StatementArrayOutput) ElementType() reflect.Type
- func (o StatementArrayOutput) Index(i pulumi.IntInput) StatementOutput
- func (o StatementArrayOutput) ToStatementArrayOutput() StatementArrayOutput
- func (o StatementArrayOutput) ToStatementArrayOutputWithContext(ctx context.Context) StatementArrayOutput
- type StatementInput
- type StatementMap
- type StatementMapInput
- type StatementMapOutput
- type StatementOutput
- func (o StatementOutput) ClusterIdentifier() pulumi.StringPtrOutput
- func (o StatementOutput) Database() pulumi.StringOutput
- func (o StatementOutput) DbUser() pulumi.StringPtrOutput
- func (StatementOutput) ElementType() reflect.Type
- func (o StatementOutput) Parameters() StatementParameterArrayOutput
- func (o StatementOutput) Region() pulumi.StringOutput
- func (o StatementOutput) SecretArn() pulumi.StringPtrOutput
- func (o StatementOutput) Sql() pulumi.StringOutput
- func (o StatementOutput) StatementName() pulumi.StringPtrOutput
- func (o StatementOutput) ToStatementOutput() StatementOutput
- func (o StatementOutput) ToStatementOutputWithContext(ctx context.Context) StatementOutput
- func (o StatementOutput) WithEvent() pulumi.BoolPtrOutput
- func (o StatementOutput) WorkgroupName() pulumi.StringPtrOutput
- type StatementParameter
- type StatementParameterArgs
- type StatementParameterArray
- type StatementParameterArrayInput
- type StatementParameterArrayOutput
- func (StatementParameterArrayOutput) ElementType() reflect.Type
- func (o StatementParameterArrayOutput) Index(i pulumi.IntInput) StatementParameterOutput
- func (o StatementParameterArrayOutput) ToStatementParameterArrayOutput() StatementParameterArrayOutput
- func (o StatementParameterArrayOutput) ToStatementParameterArrayOutputWithContext(ctx context.Context) StatementParameterArrayOutput
- type StatementParameterInput
- type StatementParameterOutput
- func (StatementParameterOutput) ElementType() reflect.Type
- func (o StatementParameterOutput) Name() pulumi.StringOutput
- func (o StatementParameterOutput) ToStatementParameterOutput() StatementParameterOutput
- func (o StatementParameterOutput) ToStatementParameterOutputWithContext(ctx context.Context) StatementParameterOutput
- func (o StatementParameterOutput) Value() pulumi.StringOutput
- type StatementState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Statement ¶
type Statement struct {
pulumi.CustomResourceState
// The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier pulumi.StringPtrOutput `pulumi:"clusterIdentifier"`
// The name of the database.
Database pulumi.StringOutput `pulumi:"database"`
// The database user name.
DbUser pulumi.StringPtrOutput `pulumi:"dbUser"`
Parameters StatementParameterArrayOutput `pulumi:"parameters"`
// 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.
Region pulumi.StringOutput `pulumi:"region"`
// The name or ARN of the secret that enables access to the database.
SecretArn pulumi.StringPtrOutput `pulumi:"secretArn"`
// The SQL statement text to run.
//
// The following arguments are optional:
Sql pulumi.StringOutput `pulumi:"sql"`
// The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
StatementName pulumi.StringPtrOutput `pulumi:"statementName"`
// A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
WithEvent pulumi.BoolPtrOutput `pulumi:"withEvent"`
// The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
WorkgroupName pulumi.StringPtrOutput `pulumi:"workgroupName"`
}
Executes a Redshift Data Statement.
## Example Usage
### clusterIdentifier
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/redshiftdata" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := redshiftdata.NewStatement(ctx, "example", &redshiftdata.StatementArgs{
ClusterIdentifier: pulumi.Any(exampleAwsRedshiftCluster.ClusterIdentifier),
Database: pulumi.Any(exampleAwsRedshiftCluster.DatabaseName),
DbUser: pulumi.Any(exampleAwsRedshiftCluster.MasterUsername),
Sql: pulumi.String("CREATE GROUP group_name;"),
})
if err != nil {
return err
}
return nil
})
}
```
### workgroupName
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/redshiftdata" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := redshiftdata.NewStatement(ctx, "example", &redshiftdata.StatementArgs{
WorkgroupName: pulumi.Any(exampleAwsRedshiftserverlessWorkgroup.WorkgroupName),
Database: pulumi.String("dev"),
Sql: pulumi.String("CREATE GROUP group_name;"),
})
if err != nil {
return err
}
return nil
})
}
```
## Import
Using `pulumi import`, import Redshift Data Statements using the `id`. For example:
```sh $ pulumi import aws:redshiftdata/statement:Statement example example ```
func GetStatement ¶
func GetStatement(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StatementState, opts ...pulumi.ResourceOption) (*Statement, error)
GetStatement gets an existing Statement resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewStatement ¶
func NewStatement(ctx *pulumi.Context, name string, args *StatementArgs, opts ...pulumi.ResourceOption) (*Statement, error)
NewStatement registers a new resource with the given unique name, arguments, and options.
func (*Statement) ElementType ¶
func (*Statement) ToStatementOutput ¶
func (i *Statement) ToStatementOutput() StatementOutput
func (*Statement) ToStatementOutputWithContext ¶
func (i *Statement) ToStatementOutputWithContext(ctx context.Context) StatementOutput
type StatementArgs ¶
type StatementArgs struct {
// The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier pulumi.StringPtrInput
// The name of the database.
Database pulumi.StringInput
// The database user name.
DbUser pulumi.StringPtrInput
Parameters StatementParameterArrayInput
// 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.
Region pulumi.StringPtrInput
// The name or ARN of the secret that enables access to the database.
SecretArn pulumi.StringPtrInput
// The SQL statement text to run.
//
// The following arguments are optional:
Sql pulumi.StringInput
// The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
StatementName pulumi.StringPtrInput
// A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
WithEvent pulumi.BoolPtrInput
// The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
WorkgroupName pulumi.StringPtrInput
}
The set of arguments for constructing a Statement resource.
func (StatementArgs) ElementType ¶
func (StatementArgs) ElementType() reflect.Type
type StatementArray ¶
type StatementArray []StatementInput
func (StatementArray) ElementType ¶
func (StatementArray) ElementType() reflect.Type
func (StatementArray) ToStatementArrayOutput ¶
func (i StatementArray) ToStatementArrayOutput() StatementArrayOutput
func (StatementArray) ToStatementArrayOutputWithContext ¶
func (i StatementArray) ToStatementArrayOutputWithContext(ctx context.Context) StatementArrayOutput
type StatementArrayInput ¶
type StatementArrayInput interface {
pulumi.Input
ToStatementArrayOutput() StatementArrayOutput
ToStatementArrayOutputWithContext(context.Context) StatementArrayOutput
}
StatementArrayInput is an input type that accepts StatementArray and StatementArrayOutput values. You can construct a concrete instance of `StatementArrayInput` via:
StatementArray{ StatementArgs{...} }
type StatementArrayOutput ¶
type StatementArrayOutput struct{ *pulumi.OutputState }
func (StatementArrayOutput) ElementType ¶
func (StatementArrayOutput) ElementType() reflect.Type
func (StatementArrayOutput) Index ¶
func (o StatementArrayOutput) Index(i pulumi.IntInput) StatementOutput
func (StatementArrayOutput) ToStatementArrayOutput ¶
func (o StatementArrayOutput) ToStatementArrayOutput() StatementArrayOutput
func (StatementArrayOutput) ToStatementArrayOutputWithContext ¶
func (o StatementArrayOutput) ToStatementArrayOutputWithContext(ctx context.Context) StatementArrayOutput
type StatementInput ¶
type StatementInput interface {
pulumi.Input
ToStatementOutput() StatementOutput
ToStatementOutputWithContext(ctx context.Context) StatementOutput
}
type StatementMap ¶
type StatementMap map[string]StatementInput
func (StatementMap) ElementType ¶
func (StatementMap) ElementType() reflect.Type
func (StatementMap) ToStatementMapOutput ¶
func (i StatementMap) ToStatementMapOutput() StatementMapOutput
func (StatementMap) ToStatementMapOutputWithContext ¶
func (i StatementMap) ToStatementMapOutputWithContext(ctx context.Context) StatementMapOutput
type StatementMapInput ¶
type StatementMapInput interface {
pulumi.Input
ToStatementMapOutput() StatementMapOutput
ToStatementMapOutputWithContext(context.Context) StatementMapOutput
}
StatementMapInput is an input type that accepts StatementMap and StatementMapOutput values. You can construct a concrete instance of `StatementMapInput` via:
StatementMap{ "key": StatementArgs{...} }
type StatementMapOutput ¶
type StatementMapOutput struct{ *pulumi.OutputState }
func (StatementMapOutput) ElementType ¶
func (StatementMapOutput) ElementType() reflect.Type
func (StatementMapOutput) MapIndex ¶
func (o StatementMapOutput) MapIndex(k pulumi.StringInput) StatementOutput
func (StatementMapOutput) ToStatementMapOutput ¶
func (o StatementMapOutput) ToStatementMapOutput() StatementMapOutput
func (StatementMapOutput) ToStatementMapOutputWithContext ¶
func (o StatementMapOutput) ToStatementMapOutputWithContext(ctx context.Context) StatementMapOutput
type StatementOutput ¶
type StatementOutput struct{ *pulumi.OutputState }
func (StatementOutput) ClusterIdentifier ¶
func (o StatementOutput) ClusterIdentifier() pulumi.StringPtrOutput
The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
func (StatementOutput) Database ¶
func (o StatementOutput) Database() pulumi.StringOutput
The name of the database.
func (StatementOutput) DbUser ¶
func (o StatementOutput) DbUser() pulumi.StringPtrOutput
The database user name.
func (StatementOutput) ElementType ¶
func (StatementOutput) ElementType() reflect.Type
func (StatementOutput) Parameters ¶
func (o StatementOutput) Parameters() StatementParameterArrayOutput
func (StatementOutput) Region ¶
func (o StatementOutput) Region() pulumi.StringOutput
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.
func (StatementOutput) SecretArn ¶
func (o StatementOutput) SecretArn() pulumi.StringPtrOutput
The name or ARN of the secret that enables access to the database.
func (StatementOutput) Sql ¶
func (o StatementOutput) Sql() pulumi.StringOutput
The SQL statement text to run.
The following arguments are optional:
func (StatementOutput) StatementName ¶
func (o StatementOutput) StatementName() pulumi.StringPtrOutput
The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
func (StatementOutput) ToStatementOutput ¶
func (o StatementOutput) ToStatementOutput() StatementOutput
func (StatementOutput) ToStatementOutputWithContext ¶
func (o StatementOutput) ToStatementOutputWithContext(ctx context.Context) StatementOutput
func (StatementOutput) WithEvent ¶
func (o StatementOutput) WithEvent() pulumi.BoolPtrOutput
A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
func (StatementOutput) WorkgroupName ¶
func (o StatementOutput) WorkgroupName() pulumi.StringPtrOutput
The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
type StatementParameter ¶
type StatementParameterArgs ¶
type StatementParameterArgs struct {
Name pulumi.StringInput `pulumi:"name"`
Value pulumi.StringInput `pulumi:"value"`
}
func (StatementParameterArgs) ElementType ¶
func (StatementParameterArgs) ElementType() reflect.Type
func (StatementParameterArgs) ToStatementParameterOutput ¶
func (i StatementParameterArgs) ToStatementParameterOutput() StatementParameterOutput
func (StatementParameterArgs) ToStatementParameterOutputWithContext ¶
func (i StatementParameterArgs) ToStatementParameterOutputWithContext(ctx context.Context) StatementParameterOutput
type StatementParameterArray ¶
type StatementParameterArray []StatementParameterInput
func (StatementParameterArray) ElementType ¶
func (StatementParameterArray) ElementType() reflect.Type
func (StatementParameterArray) ToStatementParameterArrayOutput ¶
func (i StatementParameterArray) ToStatementParameterArrayOutput() StatementParameterArrayOutput
func (StatementParameterArray) ToStatementParameterArrayOutputWithContext ¶
func (i StatementParameterArray) ToStatementParameterArrayOutputWithContext(ctx context.Context) StatementParameterArrayOutput
type StatementParameterArrayInput ¶
type StatementParameterArrayInput interface {
pulumi.Input
ToStatementParameterArrayOutput() StatementParameterArrayOutput
ToStatementParameterArrayOutputWithContext(context.Context) StatementParameterArrayOutput
}
StatementParameterArrayInput is an input type that accepts StatementParameterArray and StatementParameterArrayOutput values. You can construct a concrete instance of `StatementParameterArrayInput` via:
StatementParameterArray{ StatementParameterArgs{...} }
type StatementParameterArrayOutput ¶
type StatementParameterArrayOutput struct{ *pulumi.OutputState }
func (StatementParameterArrayOutput) ElementType ¶
func (StatementParameterArrayOutput) ElementType() reflect.Type
func (StatementParameterArrayOutput) Index ¶
func (o StatementParameterArrayOutput) Index(i pulumi.IntInput) StatementParameterOutput
func (StatementParameterArrayOutput) ToStatementParameterArrayOutput ¶
func (o StatementParameterArrayOutput) ToStatementParameterArrayOutput() StatementParameterArrayOutput
func (StatementParameterArrayOutput) ToStatementParameterArrayOutputWithContext ¶
func (o StatementParameterArrayOutput) ToStatementParameterArrayOutputWithContext(ctx context.Context) StatementParameterArrayOutput
type StatementParameterInput ¶
type StatementParameterInput interface {
pulumi.Input
ToStatementParameterOutput() StatementParameterOutput
ToStatementParameterOutputWithContext(context.Context) StatementParameterOutput
}
StatementParameterInput is an input type that accepts StatementParameterArgs and StatementParameterOutput values. You can construct a concrete instance of `StatementParameterInput` via:
StatementParameterArgs{...}
type StatementParameterOutput ¶
type StatementParameterOutput struct{ *pulumi.OutputState }
func (StatementParameterOutput) ElementType ¶
func (StatementParameterOutput) ElementType() reflect.Type
func (StatementParameterOutput) Name ¶
func (o StatementParameterOutput) Name() pulumi.StringOutput
func (StatementParameterOutput) ToStatementParameterOutput ¶
func (o StatementParameterOutput) ToStatementParameterOutput() StatementParameterOutput
func (StatementParameterOutput) ToStatementParameterOutputWithContext ¶
func (o StatementParameterOutput) ToStatementParameterOutputWithContext(ctx context.Context) StatementParameterOutput
func (StatementParameterOutput) Value ¶
func (o StatementParameterOutput) Value() pulumi.StringOutput
type StatementState ¶
type StatementState struct {
// The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
ClusterIdentifier pulumi.StringPtrInput
// The name of the database.
Database pulumi.StringPtrInput
// The database user name.
DbUser pulumi.StringPtrInput
Parameters StatementParameterArrayInput
// 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.
Region pulumi.StringPtrInput
// The name or ARN of the secret that enables access to the database.
SecretArn pulumi.StringPtrInput
// The SQL statement text to run.
//
// The following arguments are optional:
Sql pulumi.StringPtrInput
// The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
StatementName pulumi.StringPtrInput
// A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
WithEvent pulumi.BoolPtrInput
// The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
WorkgroupName pulumi.StringPtrInput
}
func (StatementState) ElementType ¶
func (StatementState) ElementType() reflect.Type