Interface AppSyncGraphQLApiProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, TargetBaseProps
All Known Implementing Classes:
AppSyncGraphQLApiProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:11.191Z") @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());
 
  • Method Details

    • getGraphQLOperation

      @Stability(Stable) @NotNull String getGraphQLOperation()
      The GraphQL operation;

      that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.

    • getEventRole

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) @Nullable default RuleTargetInput getVariables()
      The variables that are include in the GraphQL operation.

      Default: - The entire event is used

    • builder

      @Stability(Stable) static AppSyncGraphQLApiProps.Builder builder()
      Returns:
      a AppSyncGraphQLApiProps.Builder of AppSyncGraphQLApiProps