CfnReceiptRulePropsMixin
- class aws_cdk.mixins_preview.aws_ses.mixins.CfnReceiptRulePropsMixin(props, *, strategy=None)
Bases:
MixinSpecifies a receipt rule.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-receiptrule.html
- CloudformationResource:
AWS::SES::ReceiptRule
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins cfn_receipt_rule_props_mixin = ses_mixins.CfnReceiptRulePropsMixin(ses_mixins.CfnReceiptRuleMixinProps( after="after", rule=ses_mixins.CfnReceiptRulePropsMixin.RuleProperty( actions=[ses_mixins.CfnReceiptRulePropsMixin.ActionProperty( add_header_action=ses_mixins.CfnReceiptRulePropsMixin.AddHeaderActionProperty( header_name="headerName", header_value="headerValue" ), bounce_action=ses_mixins.CfnReceiptRulePropsMixin.BounceActionProperty( message="message", sender="sender", smtp_reply_code="smtpReplyCode", status_code="statusCode", topic_arn="topicArn" ), connect_action=ses_mixins.CfnReceiptRulePropsMixin.ConnectActionProperty( iam_role_arn="iamRoleArn", instance_arn="instanceArn" ), lambda_action=ses_mixins.CfnReceiptRulePropsMixin.LambdaActionProperty( function_arn="functionArn", invocation_type="invocationType", topic_arn="topicArn" ), s3_action=ses_mixins.CfnReceiptRulePropsMixin.S3ActionProperty( bucket_name="bucketName", iam_role_arn="iamRoleArn", kms_key_arn="kmsKeyArn", object_key_prefix="objectKeyPrefix", topic_arn="topicArn" ), sns_action=ses_mixins.CfnReceiptRulePropsMixin.SNSActionProperty( encoding="encoding", topic_arn="topicArn" ), stop_action=ses_mixins.CfnReceiptRulePropsMixin.StopActionProperty( scope="scope", topic_arn="topicArn" ), workmail_action=ses_mixins.CfnReceiptRulePropsMixin.WorkmailActionProperty( organization_arn="organizationArn", topic_arn="topicArn" ) )], enabled=False, name="name", recipients=["recipients"], scan_enabled=False, tls_policy="tlsPolicy" ), rule_set_name="ruleSetName" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::SES::ReceiptRule.- Parameters:
props (
Union[CfnReceiptRuleMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['after', 'rule', 'ruleSetName']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
ActionProperty
- class CfnReceiptRulePropsMixin.ActionProperty(*, add_header_action=None, bounce_action=None, connect_action=None, lambda_action=None, s3_action=None, sns_action=None, stop_action=None, workmail_action=None)
Bases:
objectAn action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own.
An instance of this data type can represent only one action.
For information about setting up receipt rules, see the Amazon SES Developer Guide .
- Parameters:
add_header_action (
Union[IResolvable,AddHeaderActionProperty,Dict[str,Any],None]) – Adds a header to the received email.bounce_action (
Union[IResolvable,BounceActionProperty,Dict[str,Any],None]) – Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).connect_action (
Union[IResolvable,ConnectActionProperty,Dict[str,Any],None]) – The action that informs a traffic policy resource to either allow or block the email if it matches a condition in the policy statement.lambda_action (
Union[IResolvable,LambdaActionProperty,Dict[str,Any],None]) – Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.s3_action (
Union[IResolvable,S3ActionProperty,Dict[str,Any],None]) – Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.sns_action (
Union[IResolvable,SNSActionProperty,Dict[str,Any],None]) – Publishes the email content within a notification to Amazon SNS.stop_action (
Union[IResolvable,StopActionProperty,Dict[str,Any],None]) – Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.workmail_action (
Union[IResolvable,WorkmailActionProperty,Dict[str,Any],None]) – Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins action_property = ses_mixins.CfnReceiptRulePropsMixin.ActionProperty( add_header_action=ses_mixins.CfnReceiptRulePropsMixin.AddHeaderActionProperty( header_name="headerName", header_value="headerValue" ), bounce_action=ses_mixins.CfnReceiptRulePropsMixin.BounceActionProperty( message="message", sender="sender", smtp_reply_code="smtpReplyCode", status_code="statusCode", topic_arn="topicArn" ), connect_action=ses_mixins.CfnReceiptRulePropsMixin.ConnectActionProperty( iam_role_arn="iamRoleArn", instance_arn="instanceArn" ), lambda_action=ses_mixins.CfnReceiptRulePropsMixin.LambdaActionProperty( function_arn="functionArn", invocation_type="invocationType", topic_arn="topicArn" ), s3_action=ses_mixins.CfnReceiptRulePropsMixin.S3ActionProperty( bucket_name="bucketName", iam_role_arn="iamRoleArn", kms_key_arn="kmsKeyArn", object_key_prefix="objectKeyPrefix", topic_arn="topicArn" ), sns_action=ses_mixins.CfnReceiptRulePropsMixin.SNSActionProperty( encoding="encoding", topic_arn="topicArn" ), stop_action=ses_mixins.CfnReceiptRulePropsMixin.StopActionProperty( scope="scope", topic_arn="topicArn" ), workmail_action=ses_mixins.CfnReceiptRulePropsMixin.WorkmailActionProperty( organization_arn="organizationArn", topic_arn="topicArn" ) )
Attributes
- add_header_action
Adds a header to the received email.
- bounce_action
Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
- connect_action
The action that informs a traffic policy resource to either allow or block the email if it matches a condition in the policy statement.
- lambda_action
Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.
- s3_action
Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.
- sns_action
Publishes the email content within a notification to Amazon SNS.
- stop_action
Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.
- workmail_action
Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.
AddHeaderActionProperty
- class CfnReceiptRulePropsMixin.AddHeaderActionProperty(*, header_name=None, header_value=None)
Bases:
objectWhen included in a receipt rule, this action adds a header to the received email.
For information about adding a header using a receipt rule, see the Amazon SES Developer Guide .
- Parameters:
header_name (
Optional[str]) – The name of the header to add to the incoming message. The name must contain at least one character, and can contain up to 50 characters. It consists of alphanumeric (a–z, A–Z, 0–9) characters and dashes.header_value (
Optional[str]) – The content to include in the header. This value can contain up to 2048 characters. It can’t contain newline (\n) or carriage return (\r) characters.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins add_header_action_property = ses_mixins.CfnReceiptRulePropsMixin.AddHeaderActionProperty( header_name="headerName", header_value="headerValue" )
Attributes
- header_name
The name of the header to add to the incoming message.
The name must contain at least one character, and can contain up to 50 characters. It consists of alphanumeric (
a–z, A–Z, 0–9) characters and dashes.
- header_value
The content to include in the header.
This value can contain up to 2048 characters. It can’t contain newline (
\n) or carriage return (\r) characters.
BounceActionProperty
- class CfnReceiptRulePropsMixin.BounceActionProperty(*, message=None, sender=None, smtp_reply_code=None, status_code=None, topic_arn=None)
Bases:
objectWhen included in a receipt rule, this action rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
For information about sending a bounce message in response to a received email, see the Amazon SES Developer Guide .
- Parameters:
message (
Optional[str]) – Human-readable text to include in the bounce message.sender (
Optional[str]) – The email address of the sender of the bounced email. This is the address from which the bounce message is sent.smtp_reply_code (
Optional[str]) – The SMTP reply code, as defined by RFC 5321 .status_code (
Optional[str]) – The SMTP enhanced status code, as defined by RFC 3463 .topic_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. 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 .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins bounce_action_property = ses_mixins.CfnReceiptRulePropsMixin.BounceActionProperty( message="message", sender="sender", smtp_reply_code="smtpReplyCode", status_code="statusCode", topic_arn="topicArn" )
Attributes
- message
Human-readable text to include in the bounce message.
- sender
The email address of the sender of the bounced email.
This is the address from which the bounce message is sent.
- topic_arn
The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken.
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 .
ConnectActionProperty
- class CfnReceiptRulePropsMixin.ConnectActionProperty(*, iam_role_arn=None, instance_arn=None)
Bases:
objectWhen included in a receipt rule, this action parses the received message and starts an email contact in Amazon Connect on your behalf.
When you receive emails, the maximum email size (including headers) is 40 MB. Additionally, emails may only have up to 10 attachments. Emails larger than 40 MB or with more than 10 attachments will be bounced.
We recommend that you configure this action via Amazon Connect.
- Parameters:
iam_role_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the IAM role to be used by Amazon Simple Email Service while starting email contacts to the Amazon Connect instance. This role should have permission to invokeconnect:StartEmailContactfor the given Amazon Connect instance.instance_arn (
Optional[str]) – The Amazon Resource Name (ARN) for the Amazon Connect instance that Amazon SES integrates with for starting email contacts. For more information about Amazon Connect instances, see the Amazon Connect Administrator Guide
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins connect_action_property = ses_mixins.CfnReceiptRulePropsMixin.ConnectActionProperty( iam_role_arn="iamRoleArn", instance_arn="instanceArn" )
Attributes
- iam_role_arn
The Amazon Resource Name (ARN) of the IAM role to be used by Amazon Simple Email Service while starting email contacts to the Amazon Connect instance.
This role should have permission to invoke
connect:StartEmailContactfor the given Amazon Connect instance.
- instance_arn
The Amazon Resource Name (ARN) for the Amazon Connect instance that Amazon SES integrates with for starting email contacts.
For more information about Amazon Connect instances, see the Amazon Connect Administrator Guide
LambdaActionProperty
- class CfnReceiptRulePropsMixin.LambdaActionProperty(*, function_arn=None, invocation_type=None, topic_arn=None)
Bases:
objectWhen 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 .
- Parameters:
function_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN isarn:aws:lambda:us-west-2:account-id:function:MyFunction. For more information about AWS Lambda, see the AWS Lambda Developer Guide .invocation_type (
Optional[str]) –The invocation type of the AWS Lambda function. An invocation type of
RequestResponsemeans that the execution of the function immediately results in a response, and a value ofEventmeans that the function is invoked asynchronously. The default value isEvent. For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide . .. epigraph:: There is a 30-second timeout onRequestResponseinvocations. 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.topic_arn (
Optional[str]) –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 .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins lambda_action_property = ses_mixins.CfnReceiptRulePropsMixin.LambdaActionProperty( function_arn="functionArn", invocation_type="invocationType", topic_arn="topicArn" )
Attributes
- function_arn
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 .
- invocation_type
The invocation type of the AWS Lambda function.
An invocation type of
RequestResponsemeans that the execution of the function immediately results in a response, and a value ofEventmeans that the function is invoked asynchronously. The default value isEvent. For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide . .. epigraph:There is a 30-second timeout on ``RequestResponse`` invocations. You should use ``Event`` invocation in most cases. Use ``RequestResponse`` only to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.
- topic_arn
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 .
RuleProperty
- class CfnReceiptRulePropsMixin.RuleProperty(*, actions=None, enabled=None, name=None, recipients=None, scan_enabled=None, tls_policy=None)
Bases:
objectReceipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.
Each receipt rule defines a set of email addresses or domains that it applies to. If the email addresses or domains match at least one recipient address of the message, Amazon SES executes all of the receipt rule’s actions on the message.
For information about setting up receipt rules, see the Amazon SES Developer Guide .
- Parameters:
actions (
Union[IResolvable,Sequence[Union[IResolvable,ActionProperty,Dict[str,Any]]],None]) – An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.enabled (
Union[bool,IResolvable,None]) – Iftrue, the receipt rule is active. The default value isfalse.name (
Optional[str]) – The name of the receipt rule. The name must meet the following requirements:. - Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), or periods (.). - Start and end with a letter or number. - Contain 64 characters or fewer.recipients (
Optional[Sequence[str]]) – The recipient domains and email addresses that the receipt rule applies to. If this field is not specified, this rule matches all recipients on all verified domains.scan_enabled (
Union[bool,IResolvable,None]) – Iftrue, then messages that this receipt rule applies to are scanned for spam and viruses. The default value isfalse.tls_policy (
Optional[str]) – Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set toRequire, Amazon SES bounces emails that are not received over TLS. The default isOptional. Valid Values:Require | Optional
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins rule_property = ses_mixins.CfnReceiptRulePropsMixin.RuleProperty( actions=[ses_mixins.CfnReceiptRulePropsMixin.ActionProperty( add_header_action=ses_mixins.CfnReceiptRulePropsMixin.AddHeaderActionProperty( header_name="headerName", header_value="headerValue" ), bounce_action=ses_mixins.CfnReceiptRulePropsMixin.BounceActionProperty( message="message", sender="sender", smtp_reply_code="smtpReplyCode", status_code="statusCode", topic_arn="topicArn" ), connect_action=ses_mixins.CfnReceiptRulePropsMixin.ConnectActionProperty( iam_role_arn="iamRoleArn", instance_arn="instanceArn" ), lambda_action=ses_mixins.CfnReceiptRulePropsMixin.LambdaActionProperty( function_arn="functionArn", invocation_type="invocationType", topic_arn="topicArn" ), s3_action=ses_mixins.CfnReceiptRulePropsMixin.S3ActionProperty( bucket_name="bucketName", iam_role_arn="iamRoleArn", kms_key_arn="kmsKeyArn", object_key_prefix="objectKeyPrefix", topic_arn="topicArn" ), sns_action=ses_mixins.CfnReceiptRulePropsMixin.SNSActionProperty( encoding="encoding", topic_arn="topicArn" ), stop_action=ses_mixins.CfnReceiptRulePropsMixin.StopActionProperty( scope="scope", topic_arn="topicArn" ), workmail_action=ses_mixins.CfnReceiptRulePropsMixin.WorkmailActionProperty( organization_arn="organizationArn", topic_arn="topicArn" ) )], enabled=False, name="name", recipients=["recipients"], scan_enabled=False, tls_policy="tlsPolicy" )
Attributes
- actions
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
- enabled
If
true, the receipt rule is active.The default value is
false.
- name
.
Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), dashes (-), or periods (.).
Start and end with a letter or number.
Contain 64 characters or fewer.
- See:
- Type:
The name of the receipt rule. The name must meet the following requirements
- recipients
The recipient domains and email addresses that the receipt rule applies to.
If this field is not specified, this rule matches all recipients on all verified domains.
- scan_enabled
If
true, then messages that this receipt rule applies to are scanned for spam and viruses.The default value is
false.
- tls_policy
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).
If this parameter is set to
Require, Amazon SES bounces emails that are not received over TLS. The default isOptional.Valid Values:
Require | Optional
S3ActionProperty
- class CfnReceiptRulePropsMixin.S3ActionProperty(*, bucket_name=None, iam_role_arn=None, kms_key_arn=None, object_key_prefix=None, topic_arn=None)
Bases:
objectWhen included in a receipt rule, this action saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
To enable Amazon SES to write emails to your Amazon S3 bucket, use an AWS KMS key to encrypt your emails, or publish to an Amazon SNS topic of another account, Amazon SES must have permission to access those resources. For information about granting permissions, see the Amazon SES Developer Guide . .. epigraph:
When you save your emails to an Amazon S3 bucket, the maximum email size (including headers) is 30 MB. Emails larger than that bounces.
For information about specifying Amazon S3 actions in receipt rules, see the Amazon SES Developer Guide .
- Parameters:
bucket_name (
Optional[str]) – The name of the Amazon S3 bucket for incoming email.iam_role_arn (
Optional[str]) – The ARN of the IAM role to be used by Amazon Simple Email Service while writing to the Amazon S3 bucket, optionally encrypting your mail via the provided customer managed key, and publishing to the Amazon SNS topic. This role should have access to the following APIs: -s3:PutObject,kms:Encryptandkms:GenerateDataKeyfor the given Amazon S3 bucket. -kms:GenerateDataKeyfor the given AWS KMS customer managed key. -sns:Publishfor the given Amazon SNS topic. .. epigraph:: If an IAM role ARN is provided, the role (and only the role) is used to access all the given resources (Amazon S3 bucket, AWS KMS customer managed key and Amazon SNS topic). Therefore, setting up individual resource access permissions is not required.kms_key_arn (
Optional[str]) –The customer managed key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the AWS managed key or a customer managed key that you created in AWS KMS as follows: - To use the AWS managed key, provide an ARN in the form of
arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses. For example, if your AWS account ID is 123456789012 and you want to use the AWS managed key in the US West (Oregon) Region, the ARN of the AWS managed key would bearn:aws:kms:us-west-2:123456789012:alias/aws/ses. If you use the AWS managed key, you don’t need to perform any extra steps to give Amazon SES permission to use the key. - To use a customer managed key that you created in AWS KMS, provide the ARN of the customer managed key and ensure that you add a statement to your key’s policy to give Amazon SES permission to use it. For more information about giving permissions, see the Amazon SES Developer Guide . For more information about key policies, see the AWS KMS Developer Guide . If you do not specify an AWS KMS key, Amazon SES does not encrypt your emails. .. epigraph:: Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the AWS SDK for Java and AWS SDK for Ruby only. For more information about client-side encryption using AWS KMS managed keys, see the Amazon S3 Developer Guide .object_key_prefix (
Optional[str]) – The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.topic_arn (
Optional[str]) –The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. 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 .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins s3_action_property = ses_mixins.CfnReceiptRulePropsMixin.S3ActionProperty( bucket_name="bucketName", iam_role_arn="iamRoleArn", kms_key_arn="kmsKeyArn", object_key_prefix="objectKeyPrefix", topic_arn="topicArn" )
Attributes
- bucket_name
The name of the Amazon S3 bucket for incoming email.
- iam_role_arn
The ARN of the IAM role to be used by Amazon Simple Email Service while writing to the Amazon S3 bucket, optionally encrypting your mail via the provided customer managed key, and publishing to the Amazon SNS topic.
This role should have access to the following APIs:
s3:PutObject,kms:Encryptandkms:GenerateDataKeyfor the given Amazon S3 bucket.kms:GenerateDataKeyfor the given AWS KMS customer managed key.sns:Publishfor the given Amazon SNS topic.
If an IAM role ARN is provided, the role (and only the role) is used to access all the given resources (Amazon S3 bucket, AWS KMS customer managed key and Amazon SNS topic). Therefore, setting up individual resource access permissions is not required.
- kms_key_arn
The customer managed key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket.
You can use the AWS managed key or a customer managed key that you created in AWS KMS as follows:
To use the AWS managed key, provide an ARN in the form of
arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses. For example, if your AWS account ID is 123456789012 and you want to use the AWS managed key in the US West (Oregon) Region, the ARN of the AWS managed key would bearn:aws:kms:us-west-2:123456789012:alias/aws/ses. If you use the AWS managed key, you don’t need to perform any extra steps to give Amazon SES permission to use the key.To use a customer managed key that you created in AWS KMS, provide the ARN of the customer managed key and ensure that you add a statement to your key’s policy to give Amazon SES permission to use it. For more information about giving permissions, see the Amazon SES Developer Guide .
For more information about key policies, see the AWS KMS Developer Guide . If you do not specify an AWS KMS key, Amazon SES does not encrypt your emails. .. epigraph:
Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the `AWS SDK for Java <https://docs.aws.amazon.com/sdk-for-java/>`_ and `AWS SDK for Ruby <https://docs.aws.amazon.com/sdk-for-ruby/>`_ only. For more information about client-side encryption using AWS KMS managed keys, see the `Amazon S3 Developer Guide <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html>`_ .
- object_key_prefix
The key prefix of the Amazon S3 bucket.
The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.
- topic_arn
The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket.
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 .
SNSActionProperty
- class CfnReceiptRulePropsMixin.SNSActionProperty(*, encoding=None, topic_arn=None)
Bases:
objectThe action to publish the email content to an Amazon SNS topic.
When executed, this action will send the email as a notification to the specified SNS topic.
- Parameters:
encoding (
Optional[str]) – The encoding to use for the email within the Amazon SNS notification. The default value isUTF-8. UseBASE64if you need to preserve all special characters, especially when the original message uses a different encoding format.topic_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the Amazon SNS Topic to which notification for the email received will be published.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins s_nSAction_property = ses_mixins.CfnReceiptRulePropsMixin.SNSActionProperty( encoding="encoding", topic_arn="topicArn" )
Attributes
- encoding
The encoding to use for the email within the Amazon SNS notification.
The default value is
UTF-8. UseBASE64if you need to preserve all special characters, especially when the original message uses a different encoding format.
- topic_arn
The Amazon Resource Name (ARN) of the Amazon SNS Topic to which notification for the email received will be published.
StopActionProperty
- class CfnReceiptRulePropsMixin.StopActionProperty(*, scope=None, topic_arn=None)
Bases:
objectWhen included in a receipt rule, this action terminates the evaluation of the receipt rule set and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
For information about setting a stop action in a receipt rule, see the Amazon SES Developer Guide .
- Parameters:
scope (
Optional[str]) – The scope of the StopAction. The only acceptable value isRuleSet.topic_arn (
Optional[str]) –The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. You can find the ARN of a topic by using the ListTopics Amazon SNS operation. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins stop_action_property = ses_mixins.CfnReceiptRulePropsMixin.StopActionProperty( scope="scope", topic_arn="topicArn" )
Attributes
- scope
The scope of the StopAction.
The only acceptable value is
RuleSet.
- topic_arn
The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken.
You can find the ARN of a topic by using the ListTopics Amazon SNS operation.
For more information about Amazon SNS topics, see the Amazon SNS Developer Guide .
WorkmailActionProperty
- class CfnReceiptRulePropsMixin.WorkmailActionProperty(*, organization_arn=None, topic_arn=None)
Bases:
objectWhen included in a receipt rule, this action calls Amazon WorkMail and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
It usually isn’t necessary to set this up manually, because Amazon WorkMail adds the rule automatically during its setup procedure.
For information using a receipt rule to call Amazon WorkMail, see the Amazon SES Developer Guide .
- Parameters:
organization_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the Amazon WorkMail organization. Amazon WorkMail ARNs use the following format:.arn:aws:workmail:<region>:<awsAccountId>:organization/<workmailOrganizationId>You can find the ID of your organization by using the ListOrganizations operation in Amazon WorkMail. Amazon WorkMail organization IDs begin with “m-“, followed by a string of alphanumeric characters. For information about Amazon WorkMail organizations, see the Amazon WorkMail Administrator Guide .topic_arn (
Optional[str]) –The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. 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 .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ses import mixins as ses_mixins workmail_action_property = ses_mixins.CfnReceiptRulePropsMixin.WorkmailActionProperty( organization_arn="organizationArn", topic_arn="topicArn" )
Attributes
- organization_arn
.
arn:aws:workmail:<region>:<awsAccountId>:organization/<workmailOrganizationId>You can find the ID of your organization by using the ListOrganizations operation in Amazon WorkMail. Amazon WorkMail organization IDs begin with “
m-“, followed by a string of alphanumeric characters.For information about Amazon WorkMail organizations, see the Amazon WorkMail Administrator Guide .
- See:
- Type:
The Amazon Resource Name (ARN) of the Amazon WorkMail organization. Amazon WorkMail ARNs use the following format
- topic_arn
The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called.
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 .