Class CfnEventInvokeConfig
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::Lambda::EventInvokeConfig
.
The AWS::Lambda::EventInvokeConfig
resource configures options for asynchronous invocation on a version or an alias.
By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous invocation queue for too long, Lambda discards it.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.lambda.*; CfnEventInvokeConfig cfnEventInvokeConfig = CfnEventInvokeConfig.Builder.create(this, "MyCfnEventInvokeConfig") .functionName("functionName") .qualifier("qualifier") // the properties below are optional .destinationConfig(DestinationConfigProperty.builder() .onFailure(OnFailureProperty.builder() .destination("destination") .build()) .onSuccess(OnSuccessProperty.builder() .destination("destination") .build()) .build()) .maximumEventAgeInSeconds(123) .maximumRetryAttempts(123) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnEventInvokeConfig
.static interface
A configuration object that specifies the destination of an event after Lambda processes it.static interface
A destination for events that failed processing.static interface
A destination for events that were processed successfully.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnEventInvokeConfig
(Construct scope, String id, CfnEventInvokeConfigProps props) Create a newAWS::Lambda::EventInvokeConfig
.protected
CfnEventInvokeConfig
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnEventInvokeConfig
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionA destination for events after they have been sent to a function for processing.The name of the Lambda function.The maximum age of a request that Lambda sends to a function for processing.The maximum number of times to retry when the function returns an error.The identifier of a version or alias.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDestinationConfig
(IResolvable value) A destination for events after they have been sent to a function for processing.void
A destination for events after they have been sent to a function for processing.void
setFunctionName
(String value) The name of the Lambda function.void
The maximum age of a request that Lambda sends to a function for processing.void
setMaximumRetryAttempts
(Number value) The maximum number of times to retry when the function returns an error.void
setQualifier
(String value) The identifier of a version or alias.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnEventInvokeConfig
protected CfnEventInvokeConfig(software.amazon.jsii.JsiiObjectRef objRef) -
CfnEventInvokeConfig
protected CfnEventInvokeConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnEventInvokeConfig
@Stability(Stable) public CfnEventInvokeConfig(@NotNull Construct scope, @NotNull String id, @NotNull CfnEventInvokeConfigProps props) Create a newAWS::Lambda::EventInvokeConfig
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getFunctionName
The name of the Lambda function.Minimum :
1
Maximum :
64
Pattern :
([a-zA-Z0-9-_]+)
-
setFunctionName
The name of the Lambda function.Minimum :
1
Maximum :
64
Pattern :
([a-zA-Z0-9-_]+)
-
getQualifier
The identifier of a version or alias.- Version - A version number.
- Alias - An alias name.
- Latest - To specify the unpublished version, use
$LATEST
.
-
setQualifier
The identifier of a version or alias.- Version - A version number.
- Alias - An alias name.
- Latest - To specify the unpublished version, use
$LATEST
.
-
getDestinationConfig
A destination for events after they have been sent to a function for processing.Destinations - Function - The Amazon Resource Name (ARN) of a Lambda function.
- Queue - The ARN of a standard SQS queue.
- Topic - The ARN of a standard SNS topic.
- Event Bus - The ARN of an Amazon EventBridge event bus.
-
setDestinationConfig
A destination for events after they have been sent to a function for processing.Destinations - Function - The Amazon Resource Name (ARN) of a Lambda function.
- Queue - The ARN of a standard SQS queue.
- Topic - The ARN of a standard SNS topic.
- Event Bus - The ARN of an Amazon EventBridge event bus.
-
setDestinationConfig
@Stability(Stable) public void setDestinationConfig(@Nullable CfnEventInvokeConfig.DestinationConfigProperty value) A destination for events after they have been sent to a function for processing.Destinations - Function - The Amazon Resource Name (ARN) of a Lambda function.
- Queue - The ARN of a standard SQS queue.
- Topic - The ARN of a standard SNS topic.
- Event Bus - The ARN of an Amazon EventBridge event bus.
-
getMaximumEventAgeInSeconds
The maximum age of a request that Lambda sends to a function for processing. -
setMaximumEventAgeInSeconds
The maximum age of a request that Lambda sends to a function for processing. -
getMaximumRetryAttempts
The maximum number of times to retry when the function returns an error. -
setMaximumRetryAttempts
The maximum number of times to retry when the function returns an error.
-