Interface AppSyncGraphQLApiProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,TargetBaseProps
- All Known Implementing Classes:
AppSyncGraphQLApiProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:31.505Z")
@Stability(Stable)
public interface AppSyncGraphQLApiProps
extends software.amazon.jsii.JsiiSerializable, TargetBaseProps
Customize the AppSync GraphQL API target.
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
Modifier and TypeInterfaceDescriptionstatic final class
A builder forAppSyncGraphQLApiProps
static final class
An implementation forAppSyncGraphQLApiProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default IRole
The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.The GraphQL operation;default RuleTargetInput
The variables that are include in the GraphQL operation.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.events.targets.TargetBaseProps
getDeadLetterQueue, getMaxEventAge, getRetryAttempts
-
Method Details
-
getGraphQLOperation
The GraphQL operation;that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.
-
getEventRole
The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.Default: - a new role with permissions to access mutations will be created
-
getVariables
The variables that are include in the GraphQL operation.Default: - The entire event is used
-
builder
- Returns:
- a
AppSyncGraphQLApiProps.Builder
ofAppSyncGraphQLApiProps
-