Skip to content
v2.273.0

IInterceptor Interface ​

Represents an interceptor that can be bound to a Gateway.

Interceptors allow custom code execution at specific points in the gateway request/response flow.

Properties ​

interceptionPointInterceptionPointinterception_pointInterceptionPointinterceptionPointInterceptionPointInterceptionPointInterceptionPointInterceptionPointInterceptionPointrequired#
The interception point where this interceptor will be invoked.

Methods ​

bind(scope: Construct, gateway: IGateway): InterceptorBindConfigdef bind(self, scope: Construct, gateway: IGateway) -> InterceptorBindConfigpublic InterceptorBindConfig bind(Construct scope, IGateway gateway)public InterceptorBindConfig Bind(Construct scope, IGateway gateway)func Bind(Scope Construct, Gateway IGateway) InterceptorBindConfig#
Binds this interceptor to a Gateway.

This method is called when the interceptor is added to a gateway. It should:

  1. Grant any necessary permissions (e.g., Lambda invoke permissions)
  2. Perform any required setup
  3. Return the CloudFormation configuration
2 parameters · returns

Parameters

  • scopescopescopescopeScope — The construct scope for creating any required resources.
  • gatewaygatewaygatewaygatewayGateway — The gateway this interceptor is being bound to [disable-awslint:prefer-ref-interface].

Returns: Configuration that will be rendered to CloudFormation