interface LambdaInvokeFunctionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.IntegTests.LambdaInvokeFunctionProps |
Java | software.amazon.awscdk.integtests.LambdaInvokeFunctionProps |
Python | aws_cdk.integ_tests.LambdaInvokeFunctionProps |
TypeScript (source) | @aws-cdk/integ-tests » LambdaInvokeFunctionProps |
Options to pass to the Lambda invokeFunction API call.
Example
declare const lambdaFunction: lambda.IFunction;
declare const app: App;
const stack = new Stack(app, 'cdk-integ-lambda-bundling');
const integ = new IntegTest(app, 'IntegTest', {
testCases: [stack],
});
const invoke = integ.assertions.invokeFunction({
functionName: lambdaFunction.functionName,
});
invoke.expect(ExpectedResult.objectLike({
Payload: '200',
}));
Properties
Name | Type | Description |
---|---|---|
function | string | The name of the function to invoke. |
invocation | Invocation | The type of invocation to use. |
log | Log | Whether to return the logs as part of the response. |
payload? | string | Payload to send as part of the invoke. |
functionName
Type:
string
The name of the function to invoke.
invocationType?
Type:
Invocation
(optional, default: InvocationType.REQUEST_RESPONE)
The type of invocation to use.
logType?
Type:
Log
(optional, default: LogType.NONE)
Whether to return the logs as part of the response.
payload?
Type:
string
(optional, default: no payload)
Payload to send as part of the invoke.