AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

HttpRoute

Route class that creates the Route for API Gateway HTTP API.

Import

import { HttpRoute } from 'aws-cdk-lib/aws-apigatewayv2';

Or use the module namespace:

import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.HttpRoute

Properties

Configuration passed to the constructor as HttpRouteProps.

httpApiRequired
IHttpApiRef

the API the route is associated with.

routeKeyRequired
HttpRouteKey

The key to this route. This is a combination of an HTTP method and an HTTP path.

authorizationScopesOptional
string[]

The list of OIDC scopes to include in the authorization. These scopes will be merged with the scopes from the attached authorizer

Default: - no additional authorization scopes

authorizerOptional
IHttpRouteAuthorizer

Authorizer for a WebSocket API or an HTTP API.

Default: - No authorizer

1 property inherited from BatchHttpRouteOptions
integrationRequiredinherited from BatchHttpRouteOptions
HttpRouteIntegration

The integration to be configured on this route.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter