libZSservicesZSamazonka-lambdaZSamazonka-lambda
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Lambda.PutFunctionEventInvokeConfig

Description

Configures options for asynchronous invocation on a function, version, or alias. If a configuration already exists for a function, version, or alias, this operation overwrites it. If you exclude any settings, they are removed. To set one option without affecting existing settings for other options, use UpdateFunctionEventInvokeConfig.

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. To retain discarded events, configure a dead-letter queue with UpdateFunctionConfiguration.

To send an invocation record to a queue, topic, function, or event bus, specify a destination. You can configure separate destinations for successful invocations (on-success) and events that fail all processing attempts (on-failure). You can configure destinations in addition to or instead of a dead-letter queue.

Synopsis

Creating a Request

data PutFunctionEventInvokeConfig Source #

See: newPutFunctionEventInvokeConfig smart constructor.

Constructors

PutFunctionEventInvokeConfig' 

Fields

  • maximumEventAgeInSeconds :: Maybe Natural

    The maximum age of a request that Lambda sends to a function for processing.

  • maximumRetryAttempts :: Maybe Natural

    The maximum number of times to retry when the function returns an error.

  • qualifier :: Maybe Text

    A version number or alias name.

  • destinationConfig :: Maybe DestinationConfig

    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 an SQS queue.
    • Topic - The ARN of an SNS topic.
    • Event Bus - The ARN of an Amazon EventBridge event bus.
  • functionName :: Text

    The name of the Lambda function, version, or alias.

    Name formats

    • Function name - my-function (name-only), my-function:v1 (with alias).
    • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
    • Partial ARN - 123456789012:function:my-function.

    You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

Instances

Instances details
Eq PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

Read PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

Show PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

Generic PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

Associated Types

type Rep PutFunctionEventInvokeConfig :: Type -> Type #

NFData PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

Hashable PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

ToJSON PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

AWSRequest PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

ToHeaders PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

ToPath PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

ToQuery PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

type Rep PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

type Rep PutFunctionEventInvokeConfig = D1 ('MetaData "PutFunctionEventInvokeConfig" "Amazonka.Lambda.PutFunctionEventInvokeConfig" "libZSservicesZSamazonka-lambdaZSamazonka-lambda" 'False) (C1 ('MetaCons "PutFunctionEventInvokeConfig'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "maximumEventAgeInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "maximumRetryAttempts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "qualifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "destinationConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DestinationConfig)) :*: S1 ('MetaSel ('Just "functionName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse PutFunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.PutFunctionEventInvokeConfig

newPutFunctionEventInvokeConfig Source #

Create a value of PutFunctionEventInvokeConfig with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:maximumEventAgeInSeconds:PutFunctionEventInvokeConfig', putFunctionEventInvokeConfig_maximumEventAgeInSeconds - The maximum age of a request that Lambda sends to a function for processing.

$sel:maximumRetryAttempts:PutFunctionEventInvokeConfig', putFunctionEventInvokeConfig_maximumRetryAttempts - The maximum number of times to retry when the function returns an error.

$sel:qualifier:PutFunctionEventInvokeConfig', putFunctionEventInvokeConfig_qualifier - A version number or alias name.

$sel:destinationConfig:PutFunctionEventInvokeConfig', putFunctionEventInvokeConfig_destinationConfig - 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 an SQS queue.
  • Topic - The ARN of an SNS topic.
  • Event Bus - The ARN of an Amazon EventBridge event bus.

$sel:functionName:PutFunctionEventInvokeConfig', putFunctionEventInvokeConfig_functionName - The name of the Lambda function, version, or alias.

Name formats

  • Function name - my-function (name-only), my-function:v1 (with alias).
  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  • Partial ARN - 123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

Request Lenses

putFunctionEventInvokeConfig_maximumEventAgeInSeconds :: Lens' PutFunctionEventInvokeConfig (Maybe Natural) Source #

The maximum age of a request that Lambda sends to a function for processing.

putFunctionEventInvokeConfig_maximumRetryAttempts :: Lens' PutFunctionEventInvokeConfig (Maybe Natural) Source #

The maximum number of times to retry when the function returns an error.

putFunctionEventInvokeConfig_destinationConfig :: Lens' PutFunctionEventInvokeConfig (Maybe DestinationConfig) Source #

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 an SQS queue.
  • Topic - The ARN of an SNS topic.
  • Event Bus - The ARN of an Amazon EventBridge event bus.

putFunctionEventInvokeConfig_functionName :: Lens' PutFunctionEventInvokeConfig Text Source #

The name of the Lambda function, version, or alias.

Name formats

  • Function name - my-function (name-only), my-function:v1 (with alias).
  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  • Partial ARN - 123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

Destructuring the Response

data FunctionEventInvokeConfig Source #

See: newFunctionEventInvokeConfig smart constructor.

Constructors

FunctionEventInvokeConfig' 

Fields

Instances

Instances details
Eq FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

Read FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

Show FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

Generic FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

Associated Types

type Rep FunctionEventInvokeConfig :: Type -> Type #

NFData FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

Hashable FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

FromJSON FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

type Rep FunctionEventInvokeConfig Source # 
Instance details

Defined in Amazonka.Lambda.Types.FunctionEventInvokeConfig

type Rep FunctionEventInvokeConfig = D1 ('MetaData "FunctionEventInvokeConfig" "Amazonka.Lambda.Types.FunctionEventInvokeConfig" "libZSservicesZSamazonka-lambdaZSamazonka-lambda" 'False) (C1 ('MetaCons "FunctionEventInvokeConfig'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "functionArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "maximumEventAgeInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "maximumRetryAttempts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "lastModified") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "destinationConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DestinationConfig))))))

newFunctionEventInvokeConfig :: FunctionEventInvokeConfig Source #

Create a value of FunctionEventInvokeConfig with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:functionArn:FunctionEventInvokeConfig', functionEventInvokeConfig_functionArn - The Amazon Resource Name (ARN) of the function.

$sel:maximumEventAgeInSeconds:FunctionEventInvokeConfig', functionEventInvokeConfig_maximumEventAgeInSeconds - The maximum age of a request that Lambda sends to a function for processing.

$sel:maximumRetryAttempts:FunctionEventInvokeConfig', functionEventInvokeConfig_maximumRetryAttempts - The maximum number of times to retry when the function returns an error.

$sel:lastModified:FunctionEventInvokeConfig', functionEventInvokeConfig_lastModified - The date and time that the configuration was last updated.

$sel:destinationConfig:FunctionEventInvokeConfig', functionEventInvokeConfig_destinationConfig - 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 an SQS queue.
  • Topic - The ARN of an SNS topic.
  • Event Bus - The ARN of an Amazon EventBridge event bus.

Response Lenses

functionEventInvokeConfig_functionArn :: Lens' FunctionEventInvokeConfig (Maybe Text) Source #

The Amazon Resource Name (ARN) of the function.

functionEventInvokeConfig_maximumEventAgeInSeconds :: Lens' FunctionEventInvokeConfig (Maybe Natural) Source #

The maximum age of a request that Lambda sends to a function for processing.

functionEventInvokeConfig_maximumRetryAttempts :: Lens' FunctionEventInvokeConfig (Maybe Natural) Source #

The maximum number of times to retry when the function returns an error.

functionEventInvokeConfig_lastModified :: Lens' FunctionEventInvokeConfig (Maybe UTCTime) Source #

The date and time that the configuration was last updated.

functionEventInvokeConfig_destinationConfig :: Lens' FunctionEventInvokeConfig (Maybe DestinationConfig) Source #

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 an SQS queue.
  • Topic - The ARN of an SNS topic.
  • Event Bus - The ARN of an Amazon EventBridge event bus.