Class HttpAuthorizer.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.HttpAuthorizer.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpAuthorizer>
- Enclosing class:
HttpAuthorizer
@Stability(Experimental)
public static final class HttpAuthorizer.Builder
extends Object
implements software.amazon.jsii.Builder<HttpAuthorizer>
(experimental) A fluent builder for
HttpAuthorizer
.-
Method Summary
Modifier and TypeMethodDescriptionauthorizerName
(String authorizerName) (experimental) Name of the authorizer.authorizerUri
(String authorizerUri) (experimental) The authorizer's Uniform Resource Identifier (URI).build()
static HttpAuthorizer.Builder
enableSimpleResponses
(Boolean enableSimpleResponses) (experimental) Specifies whether a Lambda authorizer returns a response in a simple format.(experimental) HTTP Api to attach the authorizer to.identitySource
(List<String> identitySource) (experimental) The identity source for which authorization is requested.jwtAudience
(List<String> jwtAudience) (experimental) A list of the intended recipients of the JWT.(experimental) The base domain of the identity provider that issues JWT.payloadFormatVersion
(AuthorizerPayloadVersion payloadFormatVersion) (experimental) Specifies the format of the payload sent to an HTTP API Lambda authorizer.resultsCacheTtl
(Duration resultsCacheTtl) (experimental) How long APIGateway should cache the results.type
(HttpAuthorizerType type) (experimental) The type of authorizer.
-
Method Details
-
create
@Stability(Experimental) public static HttpAuthorizer.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
HttpAuthorizer.Builder
.
-
httpApi
(experimental) HTTP Api to attach the authorizer to.- Parameters:
httpApi
- HTTP Api to attach the authorizer to. This parameter is required.- Returns:
this
-
identitySource
(experimental) The identity source for which authorization is requested.- Parameters:
identitySource
- The identity source for which authorization is requested. This parameter is required.- Returns:
this
- See Also:
-
type
(experimental) The type of authorizer.- Parameters:
type
- The type of authorizer. This parameter is required.- Returns:
this
-
authorizerName
(experimental) Name of the authorizer.Default: - id of the HttpAuthorizer construct.
- Parameters:
authorizerName
- Name of the authorizer. This parameter is required.- Returns:
this
-
authorizerUri
(experimental) The authorizer's Uniform Resource Identifier (URI).For REQUEST authorizers, this must be a well-formed Lambda function URI.
Default: - required for Request authorizer types
- Parameters:
authorizerUri
- The authorizer's Uniform Resource Identifier (URI). This parameter is required.- Returns:
this
-
enableSimpleResponses
@Stability(Experimental) public HttpAuthorizer.Builder enableSimpleResponses(Boolean enableSimpleResponses) (experimental) Specifies whether a Lambda authorizer returns a response in a simple format.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
- Parameters:
enableSimpleResponses
- Specifies whether a Lambda authorizer returns a response in a simple format. This parameter is required.- Returns:
this
-
jwtAudience
(experimental) A list of the intended recipients of the JWT.A valid JWT must provide an aud that matches at least one entry in this list.
Default: - required for JWT authorizer typess.
- Parameters:
jwtAudience
- A list of the intended recipients of the JWT. This parameter is required.- Returns:
this
-
jwtIssuer
(experimental) The base domain of the identity provider that issues JWT.Default: - required for JWT authorizer types.
- Parameters:
jwtIssuer
- The base domain of the identity provider that issues JWT. This parameter is required.- Returns:
this
-
payloadFormatVersion
@Stability(Experimental) public HttpAuthorizer.Builder payloadFormatVersion(AuthorizerPayloadVersion payloadFormatVersion) (experimental) Specifies the format of the payload sent to an HTTP API Lambda authorizer.Default: AuthorizerPayloadVersion.VERSION_2_0 if the authorizer type is HttpAuthorizerType.LAMBDA
- Parameters:
payloadFormatVersion
- Specifies the format of the payload sent to an HTTP API Lambda authorizer. This parameter is required.- Returns:
this
-
resultsCacheTtl
(experimental) How long APIGateway should cache the results.Max 1 hour.
Default: - API Gateway will not cache authorizer responses
- Parameters:
resultsCacheTtl
- How long APIGateway should cache the results. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HttpAuthorizer>
- Returns:
- a newly built instance of
HttpAuthorizer
.
-