/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace SES { namespace Model { /** *

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.

See Also:

AWS * API Reference

*/ class LambdaAction { public: AWS_SES_API LambdaAction(); AWS_SES_API LambdaAction(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SES_API LambdaAction& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SES_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_SES_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline const Aws::String& GetTopicArn() const{ return m_topicArn; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline bool TopicArnHasBeenSet() const { return m_topicArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline void SetTopicArn(const Aws::String& value) { m_topicArnHasBeenSet = true; m_topicArn = value; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline void SetTopicArn(Aws::String&& value) { m_topicArnHasBeenSet = true; m_topicArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline void SetTopicArn(const char* value) { m_topicArnHasBeenSet = true; m_topicArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline LambdaAction& WithTopicArn(const Aws::String& value) { SetTopicArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline LambdaAction& WithTopicArn(Aws::String&& value) { SetTopicArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * Lambda action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline LambdaAction& WithTopicArn(const char* value) { SetTopicArn(value); return *this;} /** *

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.

*/ inline const Aws::String& GetFunctionArn() const{ return m_functionArn; } /** *

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.

*/ inline bool FunctionArnHasBeenSet() const { return m_functionArnHasBeenSet; } /** *

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.

*/ inline void SetFunctionArn(const Aws::String& value) { m_functionArnHasBeenSet = true; m_functionArn = value; } /** *

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.

*/ inline void SetFunctionArn(Aws::String&& value) { m_functionArnHasBeenSet = true; m_functionArn = std::move(value); } /** *

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.

*/ inline void SetFunctionArn(const char* value) { m_functionArnHasBeenSet = true; m_functionArn.assign(value); } /** *

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.

*/ inline LambdaAction& WithFunctionArn(const Aws::String& value) { SetFunctionArn(value); return *this;} /** *

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.

*/ inline LambdaAction& WithFunctionArn(Aws::String&& value) { SetFunctionArn(std::move(value)); return *this;} /** *

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.

*/ inline LambdaAction& WithFunctionArn(const char* value) { SetFunctionArn(value); return *this;} /** *

The invocation type of the AWS Lambda function. An invocation type of * RequestResponse means that the execution of the function will * immediately result in a response, and a value of Event means that * the function will be 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 * RequestResponse invocations. You should use Event * invocation in most cases. Use RequestResponse only when you want to * make a mail flow decision, such as whether to stop the receipt rule or the * receipt rule set.

*/ inline const InvocationType& GetInvocationType() const{ return m_invocationType; } /** *

The invocation type of the AWS Lambda function. An invocation type of * RequestResponse means that the execution of the function will * immediately result in a response, and a value of Event means that * the function will be 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 * RequestResponse invocations. You should use Event * invocation in most cases. Use RequestResponse only when you want to * make a mail flow decision, such as whether to stop the receipt rule or the * receipt rule set.

*/ inline bool InvocationTypeHasBeenSet() const { return m_invocationTypeHasBeenSet; } /** *

The invocation type of the AWS Lambda function. An invocation type of * RequestResponse means that the execution of the function will * immediately result in a response, and a value of Event means that * the function will be 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 * RequestResponse invocations. You should use Event * invocation in most cases. Use RequestResponse only when you want to * make a mail flow decision, such as whether to stop the receipt rule or the * receipt rule set.

*/ inline void SetInvocationType(const InvocationType& value) { m_invocationTypeHasBeenSet = true; m_invocationType = value; } /** *

The invocation type of the AWS Lambda function. An invocation type of * RequestResponse means that the execution of the function will * immediately result in a response, and a value of Event means that * the function will be 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 * RequestResponse invocations. You should use Event * invocation in most cases. Use RequestResponse only when you want to * make a mail flow decision, such as whether to stop the receipt rule or the * receipt rule set.

*/ inline void SetInvocationType(InvocationType&& value) { m_invocationTypeHasBeenSet = true; m_invocationType = std::move(value); } /** *

The invocation type of the AWS Lambda function. An invocation type of * RequestResponse means that the execution of the function will * immediately result in a response, and a value of Event means that * the function will be 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 * RequestResponse invocations. You should use Event * invocation in most cases. Use RequestResponse only when you want to * make a mail flow decision, such as whether to stop the receipt rule or the * receipt rule set.

*/ inline LambdaAction& WithInvocationType(const InvocationType& value) { SetInvocationType(value); return *this;} /** *

The invocation type of the AWS Lambda function. An invocation type of * RequestResponse means that the execution of the function will * immediately result in a response, and a value of Event means that * the function will be 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 * RequestResponse invocations. You should use Event * invocation in most cases. Use RequestResponse only when you want to * make a mail flow decision, such as whether to stop the receipt rule or the * receipt rule set.

*/ inline LambdaAction& WithInvocationType(InvocationType&& value) { SetInvocationType(std::move(value)); return *this;} private: Aws::String m_topicArn; bool m_topicArnHasBeenSet = false; Aws::String m_functionArn; bool m_functionArnHasBeenSet = false; InvocationType m_invocationType; bool m_invocationTypeHasBeenSet = false; }; } // namespace Model } // namespace SES } // namespace Aws