Class CognitoUserPoolsAuthorizerProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.CognitoUserPoolsAuthorizerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CognitoUserPoolsAuthorizerProps>
- Enclosing interface:
CognitoUserPoolsAuthorizerProps
@Stability(Stable)
public static final class CognitoUserPoolsAuthorizerProps.Builder
extends Object
implements software.amazon.jsii.Builder<CognitoUserPoolsAuthorizerProps>
A builder for
CognitoUserPoolsAuthorizerProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorizerName(String authorizerName) Sets the value ofCognitoUserPoolsAuthorizerProps.getAuthorizerName()build()Builds the configured instance.cognitoUserPools(List<? extends IUserPool> cognitoUserPools) Sets the value ofCognitoUserPoolsAuthorizerProps.getCognitoUserPools()identitySource(String identitySource) Sets the value ofCognitoUserPoolsAuthorizerProps.getIdentitySource()resultsCacheTtl(Duration resultsCacheTtl) Sets the value ofCognitoUserPoolsAuthorizerProps.getResultsCacheTtl()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cognitoUserPools
@Stability(Stable) public CognitoUserPoolsAuthorizerProps.Builder cognitoUserPools(List<? extends IUserPool> cognitoUserPools) Sets the value ofCognitoUserPoolsAuthorizerProps.getCognitoUserPools()- Parameters:
cognitoUserPools- The user pools to associate with this authorizer. This parameter is required.- Returns:
this
-
authorizerName
@Stability(Stable) public CognitoUserPoolsAuthorizerProps.Builder authorizerName(String authorizerName) Sets the value ofCognitoUserPoolsAuthorizerProps.getAuthorizerName()- Parameters:
authorizerName- An optional human friendly name for the authorizer. Note that, this is not the primary identifier of the authorizer.- Returns:
this
-
identitySource
@Stability(Stable) public CognitoUserPoolsAuthorizerProps.Builder identitySource(String identitySource) Sets the value ofCognitoUserPoolsAuthorizerProps.getIdentitySource()- Parameters:
identitySource- The request header mapping expression for the bearer token. This is typically passed as part of the header, in which case this should bemethod.request.header.AuthorizerwhereAuthorizeris the header containing the bearer token.- Returns:
this
-
resultsCacheTtl
@Stability(Stable) public CognitoUserPoolsAuthorizerProps.Builder resultsCacheTtl(Duration resultsCacheTtl) Sets the value ofCognitoUserPoolsAuthorizerProps.getResultsCacheTtl()- Parameters:
resultsCacheTtl- How long APIGateway should cache the results. Max 1 hour. Disable caching by setting this to 0.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CognitoUserPoolsAuthorizerProps>- Returns:
- a new instance of
CognitoUserPoolsAuthorizerProps - Throws:
NullPointerException- if any required attribute was not provided
-