Class AuthorizationMode.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.AuthorizationMode.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AuthorizationMode>
- Enclosing interface:
- AuthorizationMode
@Stability(Experimental)
public static final class AuthorizationMode.Builder
extends Object
implements software.amazon.jsii.Builder<AuthorizationMode>
A builder for
AuthorizationMode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiKeyConfig
(ApiKeyConfig apiKeyConfig) Sets the value ofAuthorizationMode.getApiKeyConfig()
authorizationType
(AuthorizationType authorizationType) Sets the value ofAuthorizationMode.getAuthorizationType()
build()
Builds the configured instance.lambdaAuthorizerConfig
(LambdaAuthorizerConfig lambdaAuthorizerConfig) Sets the value ofAuthorizationMode.getLambdaAuthorizerConfig()
openIdConnectConfig
(OpenIdConnectConfig openIdConnectConfig) Sets the value ofAuthorizationMode.getOpenIdConnectConfig()
userPoolConfig
(UserPoolConfig userPoolConfig) Sets the value ofAuthorizationMode.getUserPoolConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
authorizationType
@Stability(Experimental) public AuthorizationMode.Builder authorizationType(AuthorizationType authorizationType) Sets the value ofAuthorizationMode.getAuthorizationType()
- Parameters:
authorizationType
- One of possible four values AppSync supports. This parameter is required.- Returns:
this
-
apiKeyConfig
Sets the value ofAuthorizationMode.getApiKeyConfig()
- Parameters:
apiKeyConfig
- If authorizationType isAuthorizationType.API_KEY
, this option can be configured.- Returns:
this
-
lambdaAuthorizerConfig
@Stability(Experimental) public AuthorizationMode.Builder lambdaAuthorizerConfig(LambdaAuthorizerConfig lambdaAuthorizerConfig) Sets the value ofAuthorizationMode.getLambdaAuthorizerConfig()
- Parameters:
lambdaAuthorizerConfig
- If authorizationType isAuthorizationType.LAMBDA
, this option is required.- Returns:
this
-
openIdConnectConfig
@Stability(Experimental) public AuthorizationMode.Builder openIdConnectConfig(OpenIdConnectConfig openIdConnectConfig) Sets the value ofAuthorizationMode.getOpenIdConnectConfig()
- Parameters:
openIdConnectConfig
- If authorizationType isAuthorizationType.OIDC
, this option is required.- Returns:
this
-
userPoolConfig
@Stability(Experimental) public AuthorizationMode.Builder userPoolConfig(UserPoolConfig userPoolConfig) Sets the value ofAuthorizationMode.getUserPoolConfig()
- Parameters:
userPoolConfig
- If authorizationType isAuthorizationType.USER_POOL
, this option is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AuthorizationMode>
- Returns:
- a new instance of
AuthorizationMode
- Throws:
NullPointerException
- if any required attribute was not provided
-