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.98.0 (build 00b106d)", date="2024-05-08T21:35:02.242Z") @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);
 
  • 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