Class HttpIamAuthorizer
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.aws_apigatewayv2_authorizers.HttpIamAuthorizer
- All Implemented Interfaces:
IHttpRouteAuthorizer,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:39:57.649Z")
@Stability(Stable)
public class HttpIamAuthorizer
extends software.amazon.jsii.JsiiObject
implements IHttpRouteAuthorizer
Authorize HTTP API Routes with IAM.
Example:
import software.amazon.awscdk.aws_apigatewayv2_authorizers.HttpIamAuthorizer;
import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpUrlIntegration;
AnyPrincipal principal;
HttpIamAuthorizer authorizer = new HttpIamAuthorizer();
HttpApi httpApi = HttpApi.Builder.create(this, "HttpApi")
.defaultAuthorizer(authorizer)
.build();
HttpRoute[] routes = httpApi.addRoutes(AddRoutesOptions.builder()
.integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.example.com"))
.path("/books/{book}")
.build());
routes[0].grantInvoke(principal);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IHttpRouteAuthorizer
IHttpRouteAuthorizer.Jsii$Default, IHttpRouteAuthorizer.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpIamAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedHttpIamAuthorizer(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind(HttpRouteAuthorizerBindOptions _options) Bind this authorizer to a specified Http route.The authorizationType used for IAM Authorizer.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
HttpIamAuthorizer
protected HttpIamAuthorizer(software.amazon.jsii.JsiiObjectRef objRef) -
HttpIamAuthorizer
protected HttpIamAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HttpIamAuthorizer
@Stability(Stable) public HttpIamAuthorizer()
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public HttpRouteAuthorizerConfig bind(@NotNull HttpRouteAuthorizerBindOptions _options) Bind this authorizer to a specified Http route.- Specified by:
bindin interfaceIHttpRouteAuthorizer- Parameters:
_options- This parameter is required.
-
getAuthorizationType
The authorizationType used for IAM Authorizer.
-