AwsApiGatewayHttpArgs
interface AwsApiGatewayHttpArgs {
authorizers?: Record<string, AwsApiGatewayHttpJwtAuthorizerArgs | AwsApiGatewayHttpCustomAuthorizerArgs>;
autoDeploy?: Input<boolean>;
customDomain?: AwsApiGatewayHttpCustomDomainArgs;
description?: Input<string>;
routes?: Record<string, Omit<AwsApiGatewayHttpRouteArgs, 'routeKey'>>;
stageName?: Input<string>;
tags?: Input<Record<string, Input<string>>>;
wafAttachment?: AwsApiGatewayWafAttachmentArgs;
}HTTP API capability inputs for AwsApiGateway.
Remarks
authorizers and routes are keyed collections whose map keys are the stable identities. Each authorizer map key is the reference key used by route-level authorisation (authorization.authorizerKey); each route map key is the API Gateway v2 route key (for example GET /health).
Example
const httpArgs: AwsApiGatewayHttpArgs = {
stageName: '$default',
routes: {
'GET /health': {
integration: {
type: 'lambda',
targetArn: lambdaFunction.arn,
createInvokePermission: false,
},
},
},
};Properties
authorizers: Record<string, AwsApiGatewayHttpJwtAuthorizerArgs | AwsApiGatewayHttpCustomAuthorizerArgs>
Optional HTTP authorizer capability definitions keyed by the reference key used by route-level authorisation. The map key is the stable identity referenced via AwsApiGatewayHttpRouteAuthorizerAuthorizationArgs.authorizerKey.
autoDeploy: Input<boolean>
Whether the stage auto-deploys route changes. Defaults to true.
customDomain: AwsApiGatewayHttpCustomDomainArgs
Optional custom-domain mapping for this HTTP API stage.
description: Input<string>
Optional API description.
routes: Record<string, Omit<AwsApiGatewayHttpRouteArgs, 'routeKey'>>
Route definitions for the HTTP API keyed by API Gateway v2 route key (for example GET /orders). The map key is both the stable route identity and the routeKey forwarded to the provider. Must contain at least one route unless customDomain.mappingTarget is provided.
stageName: Input<string>
Stage name. Defaults to $default.
tags: Input<Record<string, Input<string>>>
Additional tags merged with default project/environment tags.
wafAttachment: AwsApiGatewayWafAttachmentArgs
Optional WAFv2 web ACL attachment for the effective HTTP API stage.