Interface AuthorizationMode
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AuthorizationMode.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-27T16:50:53.145Z")
@Stability(Stable)
public interface AuthorizationMode
extends software.amazon.jsii.JsiiSerializable
Interface to specify default or additional authorization(s).
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 forAuthorizationMode
static final class
An implementation forAuthorizationMode
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthorizationMode.Builder
builder()
default ApiKeyConfig
If authorizationType isAuthorizationType.API_KEY
, this option can be configured.One of possible four values AppSync supports.default LambdaAuthorizerConfig
If authorizationType isAuthorizationType.LAMBDA
, this option is required.default OpenIdConnectConfig
If authorizationType isAuthorizationType.OIDC
, this option is required.default UserPoolConfig
If authorizationType isAuthorizationType.USER_POOL
, this option is required.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAuthorizationType
One of possible four values AppSync supports.Default: - `AuthorizationType.API_KEY`
-
getApiKeyConfig
If authorizationType isAuthorizationType.API_KEY
, this option can be configured.Default: - name: 'DefaultAPIKey' | description: 'Default API Key created by CDK'
-
getLambdaAuthorizerConfig
If authorizationType isAuthorizationType.LAMBDA
, this option is required.Default: - none
-
getOpenIdConnectConfig
If authorizationType isAuthorizationType.OIDC
, this option is required.Default: - none
-
getUserPoolConfig
If authorizationType isAuthorizationType.USER_POOL
, this option is required.Default: - none
-
builder
- Returns:
- a
AuthorizationMode.Builder
ofAuthorizationMode
-