@Stability(value=Stable) public static final class TokenAuthorizerProps.Builder extends Object implements software.amazon.jsii.Builder<TokenAuthorizerProps>
TokenAuthorizerProps| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
TokenAuthorizerProps.Builder |
assumeRole(IRole assumeRole)
Sets the value of
LambdaAuthorizerProps.getAssumeRole() |
TokenAuthorizerProps.Builder |
authorizerName(String authorizerName)
Sets the value of
LambdaAuthorizerProps.getAuthorizerName() |
TokenAuthorizerProps |
build()
Builds the configured instance.
|
TokenAuthorizerProps.Builder |
handler(IFunction handler)
Sets the value of
LambdaAuthorizerProps.getHandler() |
TokenAuthorizerProps.Builder |
identitySource(String identitySource)
Sets the value of
TokenAuthorizerProps.getIdentitySource() |
TokenAuthorizerProps.Builder |
resultsCacheTtl(Duration resultsCacheTtl)
Sets the value of
LambdaAuthorizerProps.getResultsCacheTtl() |
TokenAuthorizerProps.Builder |
validationRegex(String validationRegex)
Sets the value of
TokenAuthorizerProps.getValidationRegex() |
@Stability(value=Stable) public TokenAuthorizerProps.Builder identitySource(String identitySource)
TokenAuthorizerProps.getIdentitySource()identitySource - The request header mapping expression for the bearer token.
This is typically passed as part of the header, in which case
this should be method.request.header.Authorizer where Authorizer is the header containing the bearer token.this@Stability(value=Stable) public TokenAuthorizerProps.Builder validationRegex(String validationRegex)
TokenAuthorizerProps.getValidationRegex()validationRegex - An optional regex to be matched against the authorization token.
When matched the authorizer lambda is invoked,
otherwise a 401 Unauthorized is returned to the client.this@Stability(value=Stable) public TokenAuthorizerProps.Builder handler(IFunction handler)
LambdaAuthorizerProps.getHandler()handler - The handler for the authorizer lambda function. This parameter is required.
The handler must follow a very specific protocol on the input it receives and the output it needs to produce.
API Gateway has documented the handler's input specification
{@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html | here} and output specification
{@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html | here}.this@Stability(value=Stable) public TokenAuthorizerProps.Builder assumeRole(IRole assumeRole)
LambdaAuthorizerProps.getAssumeRole()assumeRole - An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.
The IAM role must be
assumable by 'apigateway.amazonaws.com'.this@Stability(value=Stable) public TokenAuthorizerProps.Builder authorizerName(String authorizerName)
LambdaAuthorizerProps.getAuthorizerName()authorizerName - An optional human friendly name for the authorizer.
Note that, this is not the primary identifier of the authorizer.this@Stability(value=Stable) public TokenAuthorizerProps.Builder resultsCacheTtl(Duration resultsCacheTtl)
LambdaAuthorizerProps.getResultsCacheTtl()resultsCacheTtl - How long APIGateway should cache the results.
Max 1 hour.
Disable caching by setting this to 0.this@Stability(value=Stable) public TokenAuthorizerProps build()
build in interface software.amazon.jsii.Builder<TokenAuthorizerProps>TokenAuthorizerPropsNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.