1- from typing import Iterator , List
1+ from typing import Iterator , List , Optional
22
33from aws_lambda_powertools .utilities .data_classes .common import DictWrapper
44
@@ -26,7 +26,7 @@ def get_from(self) -> List[str]:
2626 return self ["from" ]
2727
2828 @property
29- def date (self ) -> List [ str ] :
29+ def date (self ) -> str :
3030 """The date and time when Amazon SES received the message."""
3131 return self ["date" ]
3232
@@ -45,6 +45,26 @@ def subject(self) -> str:
4545 """The value of the Subject header for the email."""
4646 return str (self ["subject" ])
4747
48+ @property
49+ def cc (self ) -> Optional [List [str ]]:
50+ """The values in the CC header of the email."""
51+ return self .get ("cc" )
52+
53+ @property
54+ def bcc (self ) -> Optional [List [str ]]:
55+ """The values in the BCC header of the email."""
56+ return self .get ("bcc" )
57+
58+ @property
59+ def sender (self ) -> Optional [List [str ]]:
60+ """The values in the Sender header of the email."""
61+ return self .get ("sender" )
62+
63+ @property
64+ def reply_to (self ) -> Optional [List [str ]]:
65+ """The values in the replyTo header of the email."""
66+ return self .get ("replyTo" )
67+
4868
4969class SESMail (DictWrapper ):
5070 @property
@@ -94,6 +114,9 @@ def common_headers(self) -> SESMailCommonHeaders:
94114class SESReceiptStatus (DictWrapper ):
95115 @property
96116 def status (self ) -> str :
117+ """Receipt status
118+ Possible values: 'PASS', 'FAIL', 'GRAY', 'PROCESSING_FAILED', 'DISABLED'
119+ """
97120 return str (self ["status" ])
98121
99122
@@ -107,6 +130,12 @@ def get_type(self) -> str:
107130 # Note: this name conflicts with existing python builtins
108131 return self ["type" ]
109132
133+ @property
134+ def topic_arn (self ) -> Optional [str ]:
135+ """String that contains the Amazon Resource Name (ARN) of the Amazon SNS topic to which the
136+ notification was published."""
137+ return self .get ("topicArn" )
138+
110139 @property
111140 def function_arn (self ) -> str :
112141 """String that contains the ARN of the Lambda function that was triggered.
@@ -154,12 +183,24 @@ def spf_verdict(self) -> SESReceiptStatus:
154183 """Object that indicates whether the Sender Policy Framework (SPF) check passed."""
155184 return SESReceiptStatus (self ["spfVerdict" ])
156185
186+ @property
187+ def dkim_verdict (self ) -> SESReceiptStatus :
188+ """Object that indicates whether the DomainKeys Identified Mail (DKIM) check passed"""
189+ return SESReceiptStatus (self ["dkimVerdict" ])
190+
157191 @property
158192 def dmarc_verdict (self ) -> SESReceiptStatus :
159193 """Object that indicates whether the Domain-based Message Authentication,
160194 Reporting & Conformance (DMARC) check passed."""
161195 return SESReceiptStatus (self ["dmarcVerdict" ])
162196
197+ @property
198+ def dmarc_policy (self ) -> Optional [str ]:
199+ """Indicates the Domain-based Message Authentication, Reporting & Conformance (DMARC) settings for
200+ the sending domain. This field only appears if the message fails DMARC authentication.
201+ Possible values for this field are: none, quarantine, reject"""
202+ return self .get ("dmarcPolicy" )
203+
163204 @property
164205 def action (self ) -> SESReceiptAction :
165206 """Object that encapsulates information about the action that was executed."""
0 commit comments