Class AuthorizerIndex
- java.lang.Object
-
- software.amazon.smithy.aws.apigateway.traits.AuthorizerIndex
-
- All Implemented Interfaces:
KnowledgeIndex
public final class AuthorizerIndex extends java.lang.Object implements KnowledgeIndex
Computes the effective authorizers of each resource and operation in a service.An effective authorizer of an operation first checks if the operation has the authorizer trait, then the resource an operation is bound to, then the service.
-
-
Constructor Summary
Constructors Constructor Description AuthorizerIndex(Model model)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
getAuthorizer(ToShapeId service)
Gets the effective authorizer name of a service.java.util.Optional<java.lang.String>
getAuthorizer(ToShapeId service, ToShapeId shape)
Gets the effective authorizer name of a specific resource or operation within a service.java.util.Optional<AuthorizerDefinition>
getAuthorizerValue(ToShapeId service)
Gets the effective authorizer structure value of a service.java.util.Optional<AuthorizerDefinition>
getAuthorizerValue(ToShapeId service, ToShapeId shape)
Gets the effective authorizer structure value of a shape in a service.static AuthorizerIndex
of(Model model)
-
-
-
Constructor Detail
-
AuthorizerIndex
public AuthorizerIndex(Model model)
-
-
Method Detail
-
of
public static AuthorizerIndex of(Model model)
-
getAuthorizer
public java.util.Optional<java.lang.String> getAuthorizer(ToShapeId service, ToShapeId shape)
Gets the effective authorizer name of a specific resource or operation within a service.- Parameters:
service
- Service shape to query.shape
- Resource or operation shape ID to query.- Returns:
- Returns the optionally resolved authorizer name.
-
getAuthorizer
public java.util.Optional<java.lang.String> getAuthorizer(ToShapeId service)
Gets the effective authorizer name of a service.- Parameters:
service
- Service shape to query.- Returns:
- Returns the optionally resolved authorizer name.
-
getAuthorizerValue
public java.util.Optional<AuthorizerDefinition> getAuthorizerValue(ToShapeId service)
Gets the effective authorizer structure value of a service.- Parameters:
service
- Service shape to query.- Returns:
- Returns the optionally resolved authorizer name.
-
getAuthorizerValue
public java.util.Optional<AuthorizerDefinition> getAuthorizerValue(ToShapeId service, ToShapeId shape)
Gets the effective authorizer structure value of a shape in a service.- Parameters:
service
- Service shape to query.shape
- Shape to get the authorizer of within the service.- Returns:
- Returns the optionally resolved authorizer name.
-
-