Class CognitoAuthorizerProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrockagentcore.CognitoAuthorizerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CognitoAuthorizerProps>
- Enclosing interface:
CognitoAuthorizerProps
@Stability(Stable)
public static final class CognitoAuthorizerProps.Builder
extends Object
implements software.amazon.jsii.Builder<CognitoAuthorizerProps>
A builder for
CognitoAuthorizerProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedAudiences(List<String> allowedAudiences) Sets the value ofCognitoAuthorizerProps.getAllowedAudiences()allowedClients(List<? extends IUserPoolClient> allowedClients) Sets the value ofCognitoAuthorizerProps.getAllowedClients()allowedScopes(List<String> allowedScopes) Sets the value ofCognitoAuthorizerProps.getAllowedScopes()build()Builds the configured instance.customClaims(List<? extends GatewayCustomClaim> customClaims) Sets the value ofCognitoAuthorizerProps.getCustomClaims()Sets the value ofCognitoAuthorizerProps.getUserPool()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
userPool
Sets the value ofCognitoAuthorizerProps.getUserPool()- Parameters:
userPool- The Cognito User Pool to use for authentication. This parameter is required.- Returns:
this
-
allowedAudiences
@Stability(Stable) public CognitoAuthorizerProps.Builder allowedAudiences(List<String> allowedAudiences) Sets the value ofCognitoAuthorizerProps.getAllowedAudiences()- Parameters:
allowedAudiences- The allowed audiences for JWT validation.- Returns:
this
-
allowedClients
@Stability(Stable) public CognitoAuthorizerProps.Builder allowedClients(List<? extends IUserPoolClient> allowedClients) Sets the value ofCognitoAuthorizerProps.getAllowedClients()- Parameters:
allowedClients- The allowed User Pool clients.- Returns:
this
-
allowedScopes
Sets the value ofCognitoAuthorizerProps.getAllowedScopes()- Parameters:
allowedScopes- The allowed scopes for JWT validation.- Returns:
this
-
customClaims
@Stability(Stable) public CognitoAuthorizerProps.Builder customClaims(List<? extends GatewayCustomClaim> customClaims) Sets the value ofCognitoAuthorizerProps.getCustomClaims()- Parameters:
customClaims- Custom claims for additional JWT token validation. Allows you to validate additional fields in JWT tokens beyond the standard audience, client, and scope validations.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CognitoAuthorizerProps>- Returns:
- a new instance of
CognitoAuthorizerProps - Throws:
NullPointerException- if any required attribute was not provided
-