Interface LambdaRestApiProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, ResourceOptions, RestApiBaseProps, RestApiProps
All Known Implementing Classes:
LambdaRestApiProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2025-01-07T10:36:01.335Z") @Stability(Stable) public interface LambdaRestApiProps extends software.amazon.jsii.JsiiSerializable, RestApiProps
Example:

 Queue sourceQueue;
 Function fn = Function.Builder.create(this, "MyFunc")
         .handler("index.handler")
         .runtime(Runtime.NODEJS_LATEST)
         .code(Code.fromInline("exports.handler = e => {}"))
         .build();
 LambdaRestApi restApi = LambdaRestApi.Builder.create(this, "MyRestAPI").handler(fn).build();
 ApiGatewayTarget apiTarget = new ApiGatewayTarget(restApi);
 Pipe pipe = Pipe.Builder.create(this, "Pipe")
         .source(new SqsSource(sourceQueue))
         .target(apiTarget)
         .build();
 
  • Method Details

    • getHandler

      @Stability(Stable) @NotNull IFunction getHandler()
      The default Lambda function that handles all requests from this API.

      This handler will be used as a the default integration for all methods in this API, unless specified otherwise in addMethod.

    • getIntegrationOptions

      @Stability(Stable) @Nullable default LambdaIntegrationOptions getIntegrationOptions()
      Specific Lambda integration options.

      Default: see defaults defined in `LambdaIntegrationOptions`.

    • getProxy

      @Stability(Stable) @Nullable default Boolean getProxy()
      If true, route all requests to the Lambda Function.

      If set to false, you will need to explicitly define the API model using addResource and addMethod (or addProxy).

      Default: true

    • builder

      @Stability(Stable) static LambdaRestApiProps.Builder builder()
      Returns:
      a LambdaRestApiProps.Builder of LambdaRestApiProps