Class AppSync
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.targets.AppSync
- All Implemented Interfaces:
IRuleTarget
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:10.335Z")
@Stability(Stable)
public class AppSync
extends software.amazon.jsii.JsiiObject
implements IRuleTarget
Use an AppSync GraphQL API as a target for Amazon EventBridge rules.
Example:
import software.amazon.awscdk.services.appsync.*; GraphqlApi api = GraphqlApi.Builder.create(this, "api") .name("api") .definition(Definition.fromFile("schema.graphql")) .authorizationConfig(AuthorizationConfig.builder() .defaultAuthorization(AuthorizationMode.builder().authorizationType(AuthorizationType.IAM).build()) .build()) .build(); Rule rule = Rule.Builder.create(this, "Rule") .schedule(Schedule.rate(Duration.hours(1))) .build(); rule.addTarget(AppSync.Builder.create(api) .graphQLOperation("mutation Publish($message: String!){ publish(message: $message) { message } }") .variables(RuleTargetInput.fromObject(Map.of( "message", "hello world"))) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IRuleTarget
IRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionAppSync
(IGraphqlApi appsyncApi, AppSyncGraphQLApiProps props) protected
AppSync
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
AppSync
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns a RuleTarget that can be used to trigger this AppSync GraphQL API as a result from an EventBridge event.Returns a RuleTarget that can be used to trigger this AppSync GraphQL API as a result from an EventBridge event.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
AppSync
protected AppSync(software.amazon.jsii.JsiiObjectRef objRef) -
AppSync
protected AppSync(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AppSync
@Stability(Stable) public AppSync(@NotNull IGraphqlApi appsyncApi, @NotNull AppSyncGraphQLApiProps props) - Parameters:
appsyncApi
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
bind
Returns a RuleTarget that can be used to trigger this AppSync GraphQL API as a result from an EventBridge event.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
rule
- This parameter is required._id
-
-
bind
Returns a RuleTarget that can be used to trigger this AppSync GraphQL API as a result from an EventBridge event.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
rule
- This parameter is required.
-