Class CfnEventInvokeConfig

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:45.461Z") @Stability(Stable) public class CfnEventInvokeConfig extends CfnResource implements IInspectable
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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnEventInvokeConfigProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getFunctionName

      @Stability(Stable) @NotNull public String getFunctionName()
      The name of the Lambda function.
    • setFunctionName

      @Stability(Stable) public void setFunctionName(@NotNull String value)
      The name of the Lambda function.
    • getQualifier

      @Stability(Stable) @NotNull public String getQualifier()
      The identifier of a version or alias.
    • setQualifier

      @Stability(Stable) public void setQualifier(@NotNull String value)
      The identifier of a version or alias.
    • getDestinationConfig

      @Stability(Stable) @Nullable public Object getDestinationConfig()
      A destination for events after they have been sent to a function for processing.
    • setDestinationConfig

      @Stability(Stable) public void setDestinationConfig(@Nullable IResolvable value)
      A destination for events after they have been sent to a function for processing.
    • setDestinationConfig

      @Stability(Stable) public void setDestinationConfig(@Nullable CfnEventInvokeConfig.DestinationConfigProperty value)
      A destination for events after they have been sent to a function for processing.
    • getMaximumEventAgeInSeconds

      @Stability(Stable) @Nullable public Number getMaximumEventAgeInSeconds()
      The maximum age of a request that Lambda sends to a function for processing.
    • setMaximumEventAgeInSeconds

      @Stability(Stable) public void setMaximumEventAgeInSeconds(@Nullable Number value)
      The maximum age of a request that Lambda sends to a function for processing.
    • getMaximumRetryAttempts

      @Stability(Stable) @Nullable public Number getMaximumRetryAttempts()
      The maximum number of times to retry when the function returns an error.
    • setMaximumRetryAttempts

      @Stability(Stable) public void setMaximumRetryAttempts(@Nullable Number value)
      The maximum number of times to retry when the function returns an error.