Class CfnEventInvokeConfig

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.573Z") @Stability(Stable) public class CfnEventInvokeConfig extends CfnResource implements IInspectable
A CloudFormation 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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnEventInvokeConfigProps props)
      Create a new AWS::Lambda::EventInvokeConfig.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.

      Minimum : 1

      Maximum : 64

      Pattern : ([a-zA-Z0-9-_]+)

    • setFunctionName

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

      Minimum : 1

      Maximum : 64

      Pattern : ([a-zA-Z0-9-_]+)

    • getQualifier

      @Stability(Stable) @NotNull public String 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

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

      • Version - A version number.
      • Alias - An alias name.
      • Latest - To specify the unpublished version, use $LATEST .
    • getDestinationConfig

      @Stability(Stable) @Nullable public Object 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

      @Stability(Stable) public void setDestinationConfig(@Nullable IResolvable 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.
    • 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

      @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.