@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:02.017Z") @Stability(value=Experimental) public interface HttpAuthorizerProps extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.services.apigatewayv2.*;
Duration duration;
HttpApi httpApi;
HttpAuthorizerProps httpAuthorizerProps = HttpAuthorizerProps.builder()
.httpApi(httpApi)
.identitySource(List.of("identitySource"))
.type(HttpAuthorizerType.IAM)
// the properties below are optional
.authorizerName("authorizerName")
.authorizerUri("authorizerUri")
.enableSimpleResponses(false)
.jwtAudience(List.of("jwtAudience"))
.jwtIssuer("jwtIssuer")
.payloadFormatVersion(AuthorizerPayloadVersion.VERSION_1_0)
.resultsCacheTtl(duration)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
HttpAuthorizerProps.Builder
A builder for
HttpAuthorizerProps |
static class |
HttpAuthorizerProps.Jsii$Proxy
An implementation for
HttpAuthorizerProps |
| Modifier and Type | Method and Description |
|---|---|
static HttpAuthorizerProps.Builder |
builder() |
default String |
getAuthorizerName()
(experimental) Name of the authorizer.
|
default String |
getAuthorizerUri()
(experimental) The authorizer's Uniform Resource Identifier (URI).
|
default Boolean |
getEnableSimpleResponses()
(experimental) Specifies whether a Lambda authorizer returns a response in a simple format.
|
IHttpApi |
getHttpApi()
(experimental) HTTP Api to attach the authorizer to.
|
List<String> |
getIdentitySource()
(experimental) The identity source for which authorization is requested.
|
default List<String> |
getJwtAudience()
(experimental) A list of the intended recipients of the JWT.
|
default String |
getJwtIssuer()
(experimental) The base domain of the identity provider that issues JWT.
|
default AuthorizerPayloadVersion |
getPayloadFormatVersion()
(experimental) Specifies the format of the payload sent to an HTTP API Lambda authorizer.
|
default Duration |
getResultsCacheTtl()
(experimental) How long APIGateway should cache the results.
|
HttpAuthorizerType |
getType()
(experimental) The type of authorizer.
|
@Stability(value=Experimental) @NotNull IHttpApi getHttpApi()
@Stability(value=Experimental) @NotNull List<String> getIdentitySource()
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource@Stability(value=Experimental) @NotNull HttpAuthorizerType getType()
@Stability(value=Experimental) @Nullable default String getAuthorizerName()
Default: - id of the HttpAuthorizer construct.
@Stability(value=Experimental) @Nullable default String getAuthorizerUri()
For REQUEST authorizers, this must be a well-formed Lambda function URI.
Default: - required for Request authorizer types
@Stability(value=Experimental) @Nullable default Boolean getEnableSimpleResponses()
If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy.
Default: - The lambda authorizer must return an IAM policy as its response
@Stability(value=Experimental) @Nullable default List<String> getJwtAudience()
A valid JWT must provide an aud that matches at least one entry in this list.
Default: - required for JWT authorizer typess.
@Stability(value=Experimental) @Nullable default String getJwtIssuer()
Default: - required for JWT authorizer types.
@Stability(value=Experimental) @Nullable default AuthorizerPayloadVersion getPayloadFormatVersion()
Default: AuthorizerPayloadVersion.VERSION_2_0 if the authorizer type is HttpAuthorizerType.LAMBDA
@Stability(value=Experimental) @Nullable default Duration getResultsCacheTtl()
Max 1 hour.
Default: - API Gateway will not cache authorizer responses
@Stability(value=Experimental) static HttpAuthorizerProps.Builder builder()
HttpAuthorizerProps.Builder of HttpAuthorizerPropsCopyright © 2022. All rights reserved.