LambdaInvokeFunctionProps
- class aws_cdk.integ_tests_alpha.LambdaInvokeFunctionProps(*, function_name, invocation_type=None, log_retention=None, log_type=None, payload=None)
Bases:
object
(experimental) Options to pass to the Lambda invokeFunction API call.
- Parameters:
function_name (
str
) – (experimental) The name of the function to invoke.invocation_type (
Optional
[InvocationType
]) – (experimental) The type of invocation to use. Default: InvocationType.REQUEST_RESPONSElog_retention (
Optional
[RetentionDays
]) – (experimental) How long, in days, the log contents will be retained. Default: - no retention days specifiedlog_type (
Optional
[LogType
]) – (experimental) Whether to return the logs as part of the response. Default: LogType.NONEpayload (
Optional
[str
]) – (experimental) Payload to send as part of the invoke. Default: - no payload
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# lambda_function: lambda.IFunction # app: App stack = Stack(app, "cdk-integ-lambda-bundling") integ = IntegTest(app, "IntegTest", test_cases=[stack] ) invoke = integ.assertions.invoke_function( function_name=lambda_function.function_name ) invoke.expect(ExpectedResult.object_like({ "Payload": "200" }))
Attributes
- function_name
(experimental) The name of the function to invoke.
- Stability:
experimental
- invocation_type
(experimental) The type of invocation to use.
- Default:
InvocationType.REQUEST_RESPONSE
- Stability:
experimental
- log_retention
(experimental) How long, in days, the log contents will be retained.
- Default:
no retention days specified
- Stability:
experimental
- log_type
(experimental) Whether to return the logs as part of the response.
- Default:
LogType.NONE
- Stability:
experimental
- payload
(experimental) Payload to send as part of the invoke.
- Default:
no payload
- Stability:
experimental