Enum AppSyncAuthorizationType

java.lang.Object
java.lang.Enum<AppSyncAuthorizationType>
software.amazon.awscdk.services.appsync.AppSyncAuthorizationType
All Implemented Interfaces:
Serializable, Comparable<AppSyncAuthorizationType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)", date="2025-11-10T13:39:58.398Z") @Stability(Stable) public enum AppSyncAuthorizationType extends Enum<AppSyncAuthorizationType>
enum with all possible values for AppSync authorization type.

Example:

 import software.amazon.awscdk.services.logs.*;
 AppSyncAuthProvider apiKeyProvider = AppSyncAuthProvider.builder()
         .authorizationType(AppSyncAuthorizationType.API_KEY)
         .build();
 EventApi api = EventApi.Builder.create(this, "api")
         .apiName("Api")
         .ownerContact("OwnerContact")
         .authorizationConfig(EventApiAuthConfig.builder()
                 .authProviders(List.of(apiKeyProvider))
                 .connectionAuthModeTypes(List.of(AppSyncAuthorizationType.API_KEY))
                 .defaultPublishAuthModeTypes(List.of(AppSyncAuthorizationType.API_KEY))
                 .defaultSubscribeAuthModeTypes(List.of(AppSyncAuthorizationType.API_KEY))
                 .build())
         .logConfig(AppSyncLogConfig.builder()
                 .fieldLogLevel(AppSyncFieldLogLevel.INFO)
                 .retention(RetentionDays.ONE_WEEK)
                 .build())
         .build();
 api.addChannelNamespace("default");
 
  • Enum Constant Details

    • API_KEY

      @Stability(Stable) public static final AppSyncAuthorizationType API_KEY
      API Key authorization type.
    • IAM

      @Stability(Stable) public static final AppSyncAuthorizationType IAM
      AWS IAM authorization type.

      Can be used with Cognito Identity Pool federated credentials

    • USER_POOL

      @Stability(Stable) public static final AppSyncAuthorizationType USER_POOL
      Cognito User Pool authorization type.
    • OIDC

      @Stability(Stable) public static final AppSyncAuthorizationType OIDC
      OpenID Connect authorization type.
    • LAMBDA

      @Stability(Stable) public static final AppSyncAuthorizationType LAMBDA
      Lambda authorization type.
  • Method Details

    • values

      public static AppSyncAuthorizationType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AppSyncAuthorizationType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null