Class RedshiftQuery
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.targets.RedshiftQuery
- All Implemented Interfaces:
IRuleTarget,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T10:47:21.065Z")
@Stability(Stable)
public class RedshiftQuery
extends software.amazon.jsii.JsiiObject
implements IRuleTarget
Schedule an Amazon Redshift Query to be run, using the Redshift Data API.
If you would like Amazon Redshift to identify the Event Bridge rule, and present it in the Amazon Redshift console, append a QS2- prefix to both statementName and ruleName.
Example:
import software.amazon.awscdk.services.redshiftserverless.*;
CfnWorkgroup workgroup;
Rule rule = Rule.Builder.create(this, "Rule")
.schedule(Schedule.rate(Duration.hours(1)))
.build();
Queue dlq = new Queue(this, "DeadLetterQueue");
rule.addTarget(RedshiftQuery.Builder.create(workgroup.getAttrWorkgroupWorkgroupArn())
.database("dev")
.deadLetterQueue(dlq)
.sql(List.of("SELECT * FROM foo", "SELECT * FROM baz"))
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IRuleTarget
IRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionRedshiftQuery(String clusterArn, RedshiftQueryProps props) protectedRedshiftQuery(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedRedshiftQuery(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns the rule target specification.Returns the rule target specification.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
RedshiftQuery
protected RedshiftQuery(software.amazon.jsii.JsiiObjectRef objRef) -
RedshiftQuery
protected RedshiftQuery(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
RedshiftQuery
@Stability(Stable) public RedshiftQuery(@NotNull String clusterArn, @NotNull RedshiftQueryProps props) - Parameters:
clusterArn- The ARN of the Amazon Redshift cluster. This parameter is required.props- The properties of the Redshift Query event. This parameter is required.
-
-
Method Details
-
bind
Returns the rule target specification.NOTE: Do not use the various
inputXxxoptions. They can be set in a call toaddTarget.- Specified by:
bindin interfaceIRuleTarget- Parameters:
rule- This parameter is required._id-
-
bind
Returns the rule target specification.NOTE: Do not use the various
inputXxxoptions. They can be set in a call toaddTarget.- Specified by:
bindin interfaceIRuleTarget- Parameters:
rule- This parameter is required.
-