@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.145Z") @Stability(value=Stable) public interface CognitoUserPoolsAuthorizerProps extends software.amazon.jsii.JsiiSerializable
Example:
Resource books;
UserPool userPool = new UserPool(this, "UserPool");
CognitoUserPoolsAuthorizer auth = CognitoUserPoolsAuthorizer.Builder.create(this, "booksAuthorizer")
.cognitoUserPools(List.of(userPool))
.build();
books.addMethod("GET", new HttpIntegration("http://amazon.com"), MethodOptions.builder()
.authorizer(auth)
.authorizationType(AuthorizationType.COGNITO)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
CognitoUserPoolsAuthorizerProps.Builder
A builder for
CognitoUserPoolsAuthorizerProps |
static class |
CognitoUserPoolsAuthorizerProps.Jsii$Proxy
An implementation for
CognitoUserPoolsAuthorizerProps |
| Modifier and Type | Method and Description |
|---|---|
static CognitoUserPoolsAuthorizerProps.Builder |
builder() |
default String |
getAuthorizerName()
An optional human friendly name for the authorizer.
|
List<IUserPool> |
getCognitoUserPools()
The user pools to associate with this authorizer.
|
default String |
getIdentitySource()
The request header mapping expression for the bearer token.
|
default Duration |
getResultsCacheTtl()
How long APIGateway should cache the results.
|
@Stability(value=Stable) @NotNull List<IUserPool> getCognitoUserPools()
@Stability(value=Stable) @Nullable default String getAuthorizerName()
Note that, this is not the primary identifier of the authorizer.
Default: - the unique construct ID
@Stability(value=Stable) @Nullable default String getIdentitySource()
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.
Default: `IdentitySource.header('Authorization')`
@Stability(value=Stable) @Nullable default Duration getResultsCacheTtl()
Max 1 hour. Disable caching by setting this to 0.
Default: Duration.minutes(5)
@Stability(value=Stable) static CognitoUserPoolsAuthorizerProps.Builder builder()
Copyright © 2022. All rights reserved.