AWS Security ChangesHomeSearch

AWS ses documentation change

Service: ses · 2026-05-01 · Documentation low

File: ses/latest/dg/sesv2_example_sesv2_DeleteEmailIdentity_section.md

Summary

Updated documentation for DeleteEmailIdentity action with example code and link to Email Attachments Scenario. Added Python wrapper class implementation with error handling.

Security assessment

This change adds example code and documentation for the DeleteEmailIdentity API operation. It includes proper error handling for NotFoundException, but this is standard API documentation without any indication of addressing a security vulnerability or weakness. The change appears to be routine documentation improvement for API usage examples.

Diff

diff --git a/ses/latest/dg/sesv2_example_sesv2_DeleteEmailIdentity_section.md b/ses/latest/dg/sesv2_example_sesv2_DeleteEmailIdentity_section.md
index 997851444..7b4057e05 100644
--- a//ses/latest/dg/sesv2_example_sesv2_DeleteEmailIdentity_section.md
+++ b//ses/latest/dg/sesv2_example_sesv2_DeleteEmailIdentity_section.md
@@ -11 +11,3 @@ The following code examples show how to use `DeleteEmailIdentity`.
-Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example: 
+Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code examples: 
+
+  * [Email Attachments Scenario](./sesv2_example_sesv2_Scenario_EmailAttachments_section.html)
@@ -122 +124,66 @@ Python
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/sesv2#code-examples). 
+There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/sesv2/attachments_scenario#code-examples). 
+    
+    
+    class SESv2Wrapper:
+        """Encapsulates Amazon SESv2 email sending actions."""
+    
+        def __init__(self, sesv2_client: Any) -> None:
+            """
+            Initializes the SESv2Wrapper with an SESv2 client.
+    
+            :param sesv2_client: A Boto3 SESv2 client.
+            """
+            self.sesv2_client = sesv2_client
+    
+        @classmethod
+        def from_client(cls) -> "SESv2Wrapper":
+            """
+            Creates an SESv2Wrapper instance with a default Boto3 SESv2 client.
+    
+            :return: A new SESv2Wrapper instance.
+            """
+            sesv2_client = boto3.client("sesv2")
+            return cls(sesv2_client)
+    
+    
+        def delete_email_identity(self, email_address: str) -> None:
+            """
+            Deletes an email identity.
+    
+            :param email_address: The email address or domain to delete.
+            :raises ClientError: If the identity is not found (NotFoundException).
+            """
+            try:
+                self.sesv2_client.delete_email_identity(
+                    EmailIdentity=email_address
+                )
+                logger.info("Deleted email identity %s.", email_address)
+            except ClientError as err:
+                if err.response["Error"]["Code"] == "NotFoundException":
+                    logger.info(
+                        "Email identity %s not found or already deleted.",
+                        email_address,
+                    )
+                else:
+                    logger.error(
+                        "Couldn't delete email identity %s. Here's why: %s: %s",
+                        email_address,
+                        err.response["Error"]["Code"],
+                        err.response["Error"]["Message"],
+                    )
+                raise
+    
+    
+    
+
+  * For API details, see [DeleteEmailIdentity](https://docs.aws.amazon.com/goto/boto3/sesv2-2019-09-27/DeleteEmailIdentity) in _AWS SDK for Python (Boto3) API Reference_. 
+
+
+
+
+**SDK for Python (Boto3)**
+    
+
+###### Note
+
+There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/sesv2/newsletter_scenario#code-examples).