Class AuthorizerDefinition
java.lang.Object
software.amazon.smithy.aws.apigateway.traits.AuthorizerDefinition
- All Implemented Interfaces:
ToNode
,ToSmithyBuilder<AuthorizerDefinition>
public final class AuthorizerDefinition
extends Object
implements ToNode, ToSmithyBuilder<AuthorizerDefinition>
Represents an API Gateway authorizer.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder used to create anAuthorizerDefinition
. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthorizerDefinition.Builder
builder()
Creates a builder for an Authorizer.boolean
Gets the format of the payload returned by the authorizer.Gets the Credentials required for invoking the authorizer, if any, in the form of an ARN of an IAM execution role.Gets the customAuthType of the authorizer.Gets whether the authorizer returns simple responses.Gets the comma-separated list of mapping expressions of the request parameters as the identity source.Gets the regular expression for validating the token as the incoming identity.Gets the number of seconds during which the resulting IAM policy is cached.Gets the Smithy scheme used as the client authentication type.getType()
Gets the type of the authorizer.getUri()
Gets the Uniform Resource Identifier (URI) of the authorizer Lambda function.int
hashCode()
Take this object and create a builder that contains all of the current property values of this object.toNode()
Converts a value to aNode
.
-
Method Details
-
builder
Creates a builder for an Authorizer.- Returns:
- Returns the created builder.
-
getScheme
Gets the Smithy scheme used as the client authentication type.- Returns:
- Returns the defined client authentication type.
-
getType
Gets the type of the authorizer.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.
- Returns:
- Returns the optional authorizer type.
-
getUri
Gets the Uniform Resource Identifier (URI) of the authorizer Lambda function.- Returns:
- Returns the optional Lambda URI.
-
getCustomAuthType
Gets the customAuthType of the authorizer.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.auth#sigv4
.- Returns:
- Returns the customAuthType.
-
getCredentials
Gets the Credentials required for invoking the authorizer, if any, in the form of an ARN of an IAM execution role.For example, "arn:aws:iam::account-id:IAM_role".
- Returns:
- Returns the optional credential ARN.
-
getIdentitySource
Gets the comma-separated list of mapping expressions of the request parameters as the identity source.This property is only applicable for the authorizer of the "request" type only.
- Returns:
- Returns the optional identity source string.
-
getIdentityValidationExpression
Gets the regular expression for validating the token as the incoming identity. For example,"^x-[a-z]+"
.- Returns:
- Returns the identity regular expression.
-
getResultTtlInSeconds
Gets the number of seconds during which the resulting IAM policy is cached.- Returns:
- Returns the cache amount in seconds.
-
getAuthorizerPayloadFormatVersion
Gets the format of the payload returned by the authorizer.- Returns:
- Returns payload type.
-
getEnableSimpleResponses
Gets whether the authorizer returns simple responses.- Returns:
- Returns true if authorizer returns a boolean, false if it returns an IAM policy.
-
toBuilder
Description copied from interface:ToSmithyBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<AuthorizerDefinition>
- Returns:
- a builder for type T
-
toNode
Description copied from interface:ToNode
Converts a value to aNode
. -
equals
-
hashCode
public int hashCode()
-