Interface LambdaInvokeFunctionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LambdaInvokeFunctionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:36.740Z") @Stability(Experimental) public interface LambdaInvokeFunctionProps extends software.amazon.jsii.JsiiSerializable
(experimental) Options to pass to the Lambda invokeFunction API call.

Example:

 IFunction lambdaFunction;
 App app;
 Stack stack = new Stack(app, "cdk-integ-lambda-bundling");
 IntegTest integ = IntegTest.Builder.create(app, "IntegTest")
         .testCases(List.of(stack))
         .build();
 IAwsApiCall invoke = integ.assertions.invokeFunction(LambdaInvokeFunctionProps.builder()
         .functionName(lambdaFunction.getFunctionName())
         .build());
 invoke.expect(ExpectedResult.objectLike(Map.of(
         "Payload", "200")));
 
  • Method Details

    • getFunctionName

      @Stability(Experimental) @NotNull String getFunctionName()
      (experimental) The name of the function to invoke.
    • getInvocationType

      @Stability(Experimental) @Nullable default InvocationType getInvocationType()
      (experimental) The type of invocation to use.

      Default: InvocationType.REQUEST_RESPONE

    • getLogType

      @Stability(Experimental) @Nullable default LogType getLogType()
      (experimental) Whether to return the logs as part of the response.

      Default: LogType.NONE

    • getPayload

      @Stability(Experimental) @Nullable default String getPayload()
      (experimental) Payload to send as part of the invoke.

      Default: - no payload

    • builder

      @Stability(Experimental) static LambdaInvokeFunctionProps.Builder builder()
      Returns:
      a LambdaInvokeFunctionProps.Builder of LambdaInvokeFunctionProps