Interface AppSyncGraphQLApiProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,TargetBaseProps
- All Known Implementing Classes:
AppSyncGraphQLApiProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T10:47:21.028Z")
@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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAppSyncGraphQLApiPropsstatic final classAn implementation forAppSyncGraphQLApiProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default IRoleThe role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.The GraphQL operation;default RuleTargetInputThe variables that are include in the GraphQL operation.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods 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.BuilderofAppSyncGraphQLApiProps
-