Class: AWSCDK::SES::CfnReceiptRule::LambdaActionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SES::CfnReceiptRule::LambdaActionProperty
- Defined in:
- ses/cfn_receipt_rule.rb
Overview
When included in a receipt rule, this action calls an AWS Lambda function and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
To enable Amazon SES to call your AWS Lambda function or to publish to an Amazon SNS topic of another account, Amazon SES must have permission to access those resources. For information about giving permissions, see the Amazon SES Developer Guide .
For information about using AWS Lambda actions in receipt rules, see the Amazon SES Developer Guide .
Instance Attribute Summary collapse
-
#function_arn ⇒ String
readonly
The Amazon Resource Name (ARN) of the AWS Lambda function.
-
#invocation_type ⇒ String?
readonly
The invocation type of the AWS Lambda function.
-
#topic_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is executed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(function_arn:, invocation_type: nil, topic_arn: nil) ⇒ LambdaActionProperty
constructor
A new instance of LambdaActionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(function_arn:, invocation_type: nil, topic_arn: nil) ⇒ LambdaActionProperty
Returns a new instance of LambdaActionProperty.
819 820 821 822 823 824 825 826 |
# File 'ses/cfn_receipt_rule.rb', line 819 def initialize(function_arn:, invocation_type: nil, topic_arn: nil) @function_arn = function_arn Jsii::Type.check_type(@function_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionArn") @invocation_type = invocation_type Jsii::Type.check_type(@invocation_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "invocationType") unless @invocation_type.nil? @topic_arn = topic_arn Jsii::Type.check_type(@topic_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicArn") unless @topic_arn.nil? end |
Instance Attribute Details
#function_arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of the AWS Lambda function.
An example of an AWS Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction . For more information about AWS Lambda, see the AWS Lambda Developer Guide .
834 835 836 |
# File 'ses/cfn_receipt_rule.rb', line 834 def function_arn @function_arn end |
#invocation_type ⇒ String? (readonly)
The invocation type of the AWS Lambda function.
An invocation type of RequestResponse means that the execution of the function immediately results in a response, and a value of Event means that the function is invoked asynchronously. The default value is Event . For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide .
There is a 30-second timeout on
RequestResponseinvocations. You should useEventinvocation in most cases. UseRequestResponseonly to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.
843 844 845 |
# File 'ses/cfn_receipt_rule.rb', line 843 def invocation_type @invocation_type end |
#topic_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is executed.
You can find the ARN of a topic by using the ListTopics operation in Amazon SNS.
For more information about Amazon SNS topics, see the Amazon SNS Developer Guide .
852 853 854 |
# File 'ses/cfn_receipt_rule.rb', line 852 def topic_arn @topic_arn end |
Class Method Details
.jsii_properties ⇒ Object
854 855 856 857 858 859 860 |
# File 'ses/cfn_receipt_rule.rb', line 854 def self.jsii_properties { :function_arn => "functionArn", :invocation_type => "invocationType", :topic_arn => "topicArn", } end |
Instance Method Details
#to_jsii ⇒ Object
862 863 864 865 866 867 868 869 870 |
# File 'ses/cfn_receipt_rule.rb', line 862 def to_jsii result = {} result.merge!({ "functionArn" => @function_arn, "invocationType" => @invocation_type, "topicArn" => @topic_arn, }) result.compact end |