public static final class AuthorizerDefinition.Builder extends java.lang.Object implements SmithyBuilder<AuthorizerDefinition>
AuthorizerDefinition
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
AuthorizerDefinition |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
AuthorizerDefinition.Builder |
credentials(java.lang.String credentials)
Sets the Credentials required for invoking the authorizer, if any, in
the form of an ARN of an IAM execution role.
|
AuthorizerDefinition.Builder |
customAuthType(java.lang.String customAuthType)
Sets the customAuthType of the authorizer.
|
AuthorizerDefinition.Builder |
identitySource(java.lang.String identitySource)
Sets the comma-separated list of mapping expressions of the request
parameters as the identity source.
|
AuthorizerDefinition.Builder |
identityValidationExpression(java.lang.String identityValidationExpression)
Sets the regular expression for validating the token as the incoming
identity.
|
AuthorizerDefinition.Builder |
resultTtlInSeconds(java.lang.Integer resultTtlInSeconds)
Sets the number of seconds during which the resulting IAM policy
is cached.
|
AuthorizerDefinition.Builder |
scheme(ShapeId scheme)
Sets the client authentication scheme name.
|
AuthorizerDefinition.Builder |
type(java.lang.String type)
Sets the type of the authorizer.
|
AuthorizerDefinition.Builder |
uri(java.lang.String uri)
Sets the Uniform Resource Identifier (URI) of the authorizer
Lambda function.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public AuthorizerDefinition build()
SmithyBuilder
build
in interface SmithyBuilder<AuthorizerDefinition>
public AuthorizerDefinition.Builder scheme(ShapeId scheme)
scheme
- Client authentication scheme.public AuthorizerDefinition.Builder type(java.lang.String type)
If specifying information beyond the scheme, this value is required. The value must be "token", for an authorizer with the caller identity embedded in an authorization token, or "request", for an authorizer with the caller identity contained in request parameters.
type
- authorizer type.public AuthorizerDefinition.Builder customAuthType(java.lang.String customAuthType)
This value is not used directly by APIGateway but will be used for OpenAPI exports. This will default to "awsSigV4" if your scheme is "aws.v4", or "custom" otherwise.
customAuthType
- the auth type (e.g. awsSigV4)public AuthorizerDefinition.Builder uri(java.lang.String uri)
The syntax is as follows:
uri
- the Lambda URI to set.public AuthorizerDefinition.Builder credentials(java.lang.String credentials)
For example, "arn:aws:iam::account-id:IAM_role".
credentials
- Credentials ARN to set.public AuthorizerDefinition.Builder identitySource(java.lang.String identitySource)
This property is only applicable for the authorizer of the "request" type only.
identitySource
- Identity source CSV to set.public AuthorizerDefinition.Builder identityValidationExpression(java.lang.String identityValidationExpression)
"^x-[a-z]+"
.identityValidationExpression
- Expression to set.public AuthorizerDefinition.Builder resultTtlInSeconds(java.lang.Integer resultTtlInSeconds)
resultTtlInSeconds
- Number of seconds to cache.