EventInvokeConfigProps Struct
Properties for an EventInvokeConfig.
| Source | aws-lambda/lib/event-invoke-config.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';
declare const destination: lambda.IDestination;
declare const function_: lambda.Function;
const eventInvokeConfigProps: lambda.EventInvokeConfigProps = {
function: function_,
// the properties below are optional
maxEventAge: cdk.Duration.minutes(30),
onFailure: destination,
onSuccess: destination,
qualifier: 'qualifier',
retryAttempts: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_lambda as lambda_
# destination: lambda.IDestination
# function_: lambda.Function
event_invoke_config_props = lambda.EventInvokeConfigProps(
function=function_,
# the properties below are optional
max_event_age=cdk.Duration.minutes(30),
on_failure=destination,
on_success=destination,
qualifier="qualifier",
retry_attempts=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.lambda.*;
IDestination destination;
Function function_;
EventInvokeConfigProps eventInvokeConfigProps = EventInvokeConfigProps.builder()
.function(function_)
// the properties below are optional
.maxEventAge(Duration.minutes(30))
.onFailure(destination)
.onSuccess(destination)
.qualifier("qualifier")
.retryAttempts(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Lambda;
IDestination destination;
Function function_;
var eventInvokeConfigProps = new EventInvokeConfigProps {
Function = function_,
// the properties below are optional
MaxEventAge = Duration.Minutes(30),
OnFailure = destination,
OnSuccess = destination,
Qualifier = "qualifier",
RetryAttempts = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var destination IDestination
var function_ Function
eventInvokeConfigProps := &EventInvokeConfigProps{
Function: function_,
// the properties below are optional
MaxEventAge: cdk.Duration_Minutes(jsii.Number(30)),
OnFailure: destination,
OnSuccess: destination,
Qualifier: jsii.String("qualifier"),
RetryAttempts: jsii.Number(123),
}
Properties
The Lambda function.
maxEventAgeoptionalDurationmax_event_ageoptionalDurationmaxEventAgeoptionalDurationMaxEventAgeoptionalDurationMaxEventAgeoptionalDuration = Duration.hours(6) #The maximum age of a request that Lambda sends to a function for processing.
Minimum: 60 seconds Maximum: 6 hours
onFailureoptionalIDestinationon_failureoptionalIDestinationonFailureoptionalIDestinationOnFailureoptionalIDestinationOnFailureoptionalIDestination #The destination for failed invocations.
Default: no destination
onSuccessoptionalIDestinationon_successoptionalIDestinationonSuccessoptionalIDestinationOnSuccessoptionalIDestinationOnSuccessoptionalIDestination #The destination for successful invocations.
Default: no destination
qualifieroptionalstringqualifieroptionalstrqualifieroptionalStringQualifieroptionalstringQualifieroptional*string #The qualifier.
Default: latest version
retryAttemptsoptionalnumberretry_attemptsoptionalint | floatretryAttemptsoptionalNumberRetryAttemptsoptionaldoubleRetryAttemptsoptional*float64 = 2 #The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2