Class HttpAuthorizerProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.HttpAuthorizerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpAuthorizerProps>
- Enclosing interface:
HttpAuthorizerProps
@Stability(Stable)
public static final class HttpAuthorizerProps.Builder
extends Object
implements software.amazon.jsii.Builder<HttpAuthorizerProps>
A builder for
HttpAuthorizerProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorizerName(String authorizerName) Sets the value ofHttpAuthorizerProps.getAuthorizerName()authorizerUri(String authorizerUri) Sets the value ofHttpAuthorizerProps.getAuthorizerUri()build()Builds the configured instance.enableSimpleResponses(Boolean enableSimpleResponses) Sets the value ofHttpAuthorizerProps.getEnableSimpleResponses()Sets the value ofHttpAuthorizerProps.getHttpApi()identitySource(List<String> identitySource) Sets the value ofHttpAuthorizerProps.getIdentitySource()jwtAudience(List<String> jwtAudience) Sets the value ofHttpAuthorizerProps.getJwtAudience()Sets the value ofHttpAuthorizerProps.getJwtIssuer()payloadFormatVersion(AuthorizerPayloadVersion payloadFormatVersion) Sets the value ofHttpAuthorizerProps.getPayloadFormatVersion()resultsCacheTtl(Duration resultsCacheTtl) Sets the value ofHttpAuthorizerProps.getResultsCacheTtl()type(HttpAuthorizerType type) Sets the value ofHttpAuthorizerProps.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
httpApi
Sets the value ofHttpAuthorizerProps.getHttpApi()- Parameters:
httpApi- HTTP Api to attach the authorizer to. This parameter is required.- Returns:
this
-
identitySource
Sets the value ofHttpAuthorizerProps.getIdentitySource()- Parameters:
identitySource- The identity source for which authorization is requested. This parameter is required.- Returns:
this
-
type
Sets the value ofHttpAuthorizerProps.getType()- Parameters:
type- The type of authorizer. This parameter is required.- Returns:
this
-
authorizerName
Sets the value ofHttpAuthorizerProps.getAuthorizerName()- Parameters:
authorizerName- Name of the authorizer.- Returns:
this
-
authorizerUri
Sets the value ofHttpAuthorizerProps.getAuthorizerUri()- Parameters:
authorizerUri- The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI.- Returns:
this
-
enableSimpleResponses
@Stability(Stable) public HttpAuthorizerProps.Builder enableSimpleResponses(Boolean enableSimpleResponses) Sets the value ofHttpAuthorizerProps.getEnableSimpleResponses()- Parameters:
enableSimpleResponses- 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.- Returns:
this
-
jwtAudience
Sets the value ofHttpAuthorizerProps.getJwtAudience()- Parameters:
jwtAudience- 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.- Returns:
this
-
jwtIssuer
Sets the value ofHttpAuthorizerProps.getJwtIssuer()- Parameters:
jwtIssuer- The base domain of the identity provider that issues JWT.- Returns:
this
-
payloadFormatVersion
@Stability(Stable) public HttpAuthorizerProps.Builder payloadFormatVersion(AuthorizerPayloadVersion payloadFormatVersion) Sets the value ofHttpAuthorizerProps.getPayloadFormatVersion()- Parameters:
payloadFormatVersion- Specifies the format of the payload sent to an HTTP API Lambda authorizer.- Returns:
this
-
resultsCacheTtl
Sets the value ofHttpAuthorizerProps.getResultsCacheTtl()- Parameters:
resultsCacheTtl- How long APIGateway should cache the results. Max 1 hour.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<HttpAuthorizerProps>- Returns:
- a new instance of
HttpAuthorizerProps - Throws:
NullPointerException- if any required attribute was not provided
-