UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

196 lines (195 loc) 7.57 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Executes a Redshift Data Statement. * * ## Example Usage * * ### clusterIdentifier * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshiftdata.Statement("example", { * clusterIdentifier: exampleAwsRedshiftCluster.clusterIdentifier, * database: exampleAwsRedshiftCluster.databaseName, * dbUser: exampleAwsRedshiftCluster.masterUsername, * sql: "CREATE GROUP group_name;", * }); * ``` * * ### workgroupName * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshiftdata.Statement("example", { * workgroupName: exampleAwsRedshiftserverlessWorkgroup.workgroupName, * database: "dev", * sql: "CREATE GROUP group_name;", * }); * ``` * * ## Import * * Using `pulumi import`, import Redshift Data Statements using the `id`. For example: * * ```sh * $ pulumi import aws:redshiftdata/statement:Statement example example * ``` */ export declare class Statement extends pulumi.CustomResource { /** * Get an existing Statement resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: StatementState, opts?: pulumi.CustomResourceOptions): Statement; /** * Returns true if the given object is an instance of Statement. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Statement; /** * The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials. */ readonly clusterIdentifier: pulumi.Output<string | undefined>; /** * The name of the database. */ readonly database: pulumi.Output<string>; /** * The database user name. */ readonly dbUser: pulumi.Output<string | undefined>; readonly parameters: pulumi.Output<outputs.redshiftdata.StatementParameter[] | undefined>; /** * 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. */ readonly region: pulumi.Output<string>; /** * The name or ARN of the secret that enables access to the database. */ readonly secretArn: pulumi.Output<string | undefined>; /** * The SQL statement text to run. * * The following arguments are optional: */ readonly sql: pulumi.Output<string>; /** * The name of the SQL statement. You can name the SQL statement when you create it to identify the query. */ readonly statementName: pulumi.Output<string | undefined>; /** * A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs. */ readonly withEvent: pulumi.Output<boolean | undefined>; /** * The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials. */ readonly workgroupName: pulumi.Output<string | undefined>; /** * Create a Statement resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: StatementArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Statement resources. */ export interface StatementState { /** * The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials. */ clusterIdentifier?: pulumi.Input<string>; /** * The name of the database. */ database?: pulumi.Input<string>; /** * The database user name. */ dbUser?: pulumi.Input<string>; parameters?: pulumi.Input<pulumi.Input<inputs.redshiftdata.StatementParameter>[]>; /** * 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.Input<string>; /** * The name or ARN of the secret that enables access to the database. */ secretArn?: pulumi.Input<string>; /** * The SQL statement text to run. * * The following arguments are optional: */ sql?: pulumi.Input<string>; /** * The name of the SQL statement. You can name the SQL statement when you create it to identify the query. */ statementName?: pulumi.Input<string>; /** * A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs. */ withEvent?: pulumi.Input<boolean>; /** * 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.Input<string>; } /** * The set of arguments for constructing a Statement resource. */ export interface StatementArgs { /** * The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials. */ clusterIdentifier?: pulumi.Input<string>; /** * The name of the database. */ database: pulumi.Input<string>; /** * The database user name. */ dbUser?: pulumi.Input<string>; parameters?: pulumi.Input<pulumi.Input<inputs.redshiftdata.StatementParameter>[]>; /** * 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.Input<string>; /** * The name or ARN of the secret that enables access to the database. */ secretArn?: pulumi.Input<string>; /** * The SQL statement text to run. * * The following arguments are optional: */ sql: pulumi.Input<string>; /** * The name of the SQL statement. You can name the SQL statement when you create it to identify the query. */ statementName?: pulumi.Input<string>; /** * A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs. */ withEvent?: pulumi.Input<boolean>; /** * 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.Input<string>; }