Class CfnMailManagerRuleSet.SnsActionProperty
The action to publish the email content to an Amazon SNS topic.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.SES
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnMailManagerRuleSet.SnsActionProperty : CfnMailManagerRuleSet.ISnsActionProperty
Syntax (vb)
Public Class CfnMailManagerRuleSet.SnsActionProperty Implements CfnMailManagerRuleSet.ISnsActionProperty
Remarks
When executed, this action will send the email as a notification to the specified SNS topic.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SES;
var snsActionProperty = new SnsActionProperty {
RoleArn = "roleArn",
TopicArn = "topicArn",
// the properties below are optional
ActionFailurePolicy = "actionFailurePolicy",
Encoding = "encoding",
PayloadType = "payloadType"
};
Synopsis
Constructors
| SnsActionProperty() | The action to publish the email content to an Amazon SNS topic. |
Properties
| ActionFailurePolicy | A policy that states what to do in the case of failure. |
| Encoding | The encoding to use for the email within the Amazon SNS notification. |
| PayloadType | The expected payload type within the Amazon SNS notification. |
| RoleArn | The Amazon Resource Name (ARN) of the IAM Role to use while writing to Amazon SNS. |
| TopicArn | The Amazon Resource Name (ARN) of the Amazon SNS Topic to which notification for the email received will be published. |
Constructors
SnsActionProperty()
The action to publish the email content to an Amazon SNS topic.
public SnsActionProperty()
Remarks
When executed, this action will send the email as a notification to the specified SNS topic.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SES;
var snsActionProperty = new SnsActionProperty {
RoleArn = "roleArn",
TopicArn = "topicArn",
// the properties below are optional
ActionFailurePolicy = "actionFailurePolicy",
Encoding = "encoding",
PayloadType = "payloadType"
};
Properties
ActionFailurePolicy
A policy that states what to do in the case of failure.
public string? ActionFailurePolicy { get; set; }
Property Value
Remarks
The action will fail if there are configuration errors. For example, specified SNS topic has been deleted or the role lacks necessary permissions to call the sns:Publish API.
Encoding
The encoding to use for the email within the Amazon SNS notification.
public string? Encoding { get; set; }
Property Value
Remarks
The default value is UTF-8 . Use BASE64 if you need to preserve all special characters, especially when the original message uses a different encoding format.
PayloadType
The expected payload type within the Amazon SNS notification.
public string? PayloadType { get; set; }
Property Value
Remarks
CONTENT attempts to publish the full email content with 20KB of headers content. HEADERS extracts up to 100KB of header content to include in the notification, email content will not be included to the notification. The default value is CONTENT .
RoleArn
The Amazon Resource Name (ARN) of the IAM Role to use while writing to Amazon SNS.
public string RoleArn { get; set; }
Property Value
Remarks
This role must have access to the sns:Publish API for the given topic.
TopicArn
The Amazon Resource Name (ARN) of the Amazon SNS Topic to which notification for the email received will be published.
public string TopicArn { get; set; }