SESClient
Auto-generated documentation for SES type annotations stubs module mypy-boto3-ses.
SESClient
Type annotations and code completion for boto3.client("ses")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_ses.client import SESClient
def get_ses_client() -> SESClient:
return Session().client("ses")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("ses").exceptions
structure.
client = boto3.client("ses")
try:
do_something(client)
except (
client.AccountSendingPausedException,
client.AlreadyExistsException,
client.CannotDeleteException,
client.ClientError,
client.ConfigurationSetAlreadyExistsException,
client.ConfigurationSetDoesNotExistException,
client.ConfigurationSetSendingPausedException,
client.CustomVerificationEmailInvalidContentException,
client.CustomVerificationEmailTemplateAlreadyExistsException,
client.CustomVerificationEmailTemplateDoesNotExistException,
client.EventDestinationAlreadyExistsException,
client.EventDestinationDoesNotExistException,
client.FromEmailAddressNotVerifiedException,
client.InvalidCloudWatchDestinationException,
client.InvalidConfigurationSetException,
client.InvalidDeliveryOptionsException,
client.InvalidFirehoseDestinationException,
client.InvalidLambdaFunctionException,
client.InvalidPolicyException,
client.InvalidRenderingParameterException,
client.InvalidS3ConfigurationException,
client.InvalidSNSDestinationException,
client.InvalidSnsTopicException,
client.InvalidTemplateException,
client.InvalidTrackingOptionsException,
client.LimitExceededException,
client.MailFromDomainNotVerifiedException,
client.MessageRejected,
client.MissingRenderingAttributeException,
client.ProductionAccessNotGrantedException,
client.RuleDoesNotExistException,
client.RuleSetDoesNotExistException,
client.TemplateDoesNotExistException,
client.TrackingOptionsAlreadyExistsException,
client.TrackingOptionsDoesNotExistException,
) as e:
print(e)
from mypy_boto3_ses.client import Exceptions
def handle_error(exc: Exceptions.AccountSendingPausedException) -> None:
...
Methods
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("ses").can_paginate
method.
boto3 documentation
clone_receipt_rule_set
Creates a receipt rule set by cloning an existing one.
Type annotations and code completion for boto3.client("ses").clone_receipt_rule_set
method.
boto3 documentation
def clone_receipt_rule_set(
self,
*,
RuleSetName: str,
OriginalRuleSetName: str,
) -> Dict[str, Any]:
...
kwargs: CloneReceiptRuleSetRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
"OriginalRuleSetName": ...,
}
parent.clone_receipt_rule_set(**kwargs)
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("ses").close
method.
boto3 documentation
create_configuration_set
Creates a configuration set.
Type annotations and code completion for boto3.client("ses").create_configuration_set
method.
boto3 documentation
def create_configuration_set(
self,
*,
ConfigurationSet: ConfigurationSetTypeDef, # (1)
) -> Dict[str, Any]:
...
kwargs: CreateConfigurationSetRequestRequestTypeDef = { # (1)
"ConfigurationSet": ...,
}
parent.create_configuration_set(**kwargs)
create_configuration_set_event_destination
Creates a configuration set event destination.
Type annotations and code completion for boto3.client("ses").create_configuration_set_event_destination
method.
boto3 documentation
def create_configuration_set_event_destination(
self,
*,
ConfigurationSetName: str,
EventDestination: EventDestinationTypeDef, # (1)
) -> Dict[str, Any]:
...
kwargs: CreateConfigurationSetEventDestinationRequestRequestTypeDef = { # (1)
"ConfigurationSetName": ...,
"EventDestination": ...,
}
parent.create_configuration_set_event_destination(**kwargs)
create_configuration_set_tracking_options
Creates an association between a configuration set and a custom domain for open and click event tracking.
Type annotations and code completion for boto3.client("ses").create_configuration_set_tracking_options
method.
boto3 documentation
def create_configuration_set_tracking_options(
self,
*,
ConfigurationSetName: str,
TrackingOptions: TrackingOptionsTypeDef, # (1)
) -> Dict[str, Any]:
...
kwargs: CreateConfigurationSetTrackingOptionsRequestRequestTypeDef = { # (1)
"ConfigurationSetName": ...,
"TrackingOptions": ...,
}
parent.create_configuration_set_tracking_options(**kwargs)
create_custom_verification_email_template
Creates a new custom verification email template.
Type annotations and code completion for boto3.client("ses").create_custom_verification_email_template
method.
boto3 documentation
def create_custom_verification_email_template(
self,
*,
TemplateName: str,
FromEmailAddress: str,
TemplateSubject: str,
TemplateContent: str,
SuccessRedirectionURL: str,
FailureRedirectionURL: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: CreateCustomVerificationEmailTemplateRequestRequestTypeDef = { # (1)
"TemplateName": ...,
"FromEmailAddress": ...,
"TemplateSubject": ...,
"TemplateContent": ...,
"SuccessRedirectionURL": ...,
"FailureRedirectionURL": ...,
}
parent.create_custom_verification_email_template(**kwargs)
create_receipt_filter
Creates a new IP address filter.
Type annotations and code completion for boto3.client("ses").create_receipt_filter
method.
boto3 documentation
def create_receipt_filter(
self,
*,
Filter: ReceiptFilterTypeDef, # (1)
) -> Dict[str, Any]:
...
kwargs: CreateReceiptFilterRequestRequestTypeDef = { # (1)
"Filter": ...,
}
parent.create_receipt_filter(**kwargs)
create_receipt_rule
Creates a receipt rule.
Type annotations and code completion for boto3.client("ses").create_receipt_rule
method.
boto3 documentation
def create_receipt_rule(
self,
*,
RuleSetName: str,
Rule: ReceiptRuleTypeDef, # (1)
After: str = ...,
) -> Dict[str, Any]:
...
kwargs: CreateReceiptRuleRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
"Rule": ...,
}
parent.create_receipt_rule(**kwargs)
create_receipt_rule_set
Creates an empty receipt rule set.
Type annotations and code completion for boto3.client("ses").create_receipt_rule_set
method.
boto3 documentation
kwargs: CreateReceiptRuleSetRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
}
parent.create_receipt_rule_set(**kwargs)
create_template
Creates an email template.
Type annotations and code completion for boto3.client("ses").create_template
method.
boto3 documentation
def create_template(
self,
*,
Template: TemplateTypeDef, # (1)
) -> Dict[str, Any]:
...
- See TemplateTypeDef
kwargs: CreateTemplateRequestRequestTypeDef = { # (1)
"Template": ...,
}
parent.create_template(**kwargs)
delete_configuration_set
Deletes a configuration set.
Type annotations and code completion for boto3.client("ses").delete_configuration_set
method.
boto3 documentation
def delete_configuration_set(
self,
*,
ConfigurationSetName: str,
) -> Dict[str, Any]:
...
kwargs: DeleteConfigurationSetRequestRequestTypeDef = { # (1)
"ConfigurationSetName": ...,
}
parent.delete_configuration_set(**kwargs)
delete_configuration_set_event_destination
Deletes a configuration set event destination.
Type annotations and code completion for boto3.client("ses").delete_configuration_set_event_destination
method.
boto3 documentation
def delete_configuration_set_event_destination(
self,
*,
ConfigurationSetName: str,
EventDestinationName: str,
) -> Dict[str, Any]:
...
kwargs: DeleteConfigurationSetEventDestinationRequestRequestTypeDef = { # (1)
"ConfigurationSetName": ...,
"EventDestinationName": ...,
}
parent.delete_configuration_set_event_destination(**kwargs)
delete_configuration_set_tracking_options
Deletes an association between a configuration set and a custom domain for open and click event tracking.
Type annotations and code completion for boto3.client("ses").delete_configuration_set_tracking_options
method.
boto3 documentation
def delete_configuration_set_tracking_options(
self,
*,
ConfigurationSetName: str,
) -> Dict[str, Any]:
...
kwargs: DeleteConfigurationSetTrackingOptionsRequestRequestTypeDef = { # (1)
"ConfigurationSetName": ...,
}
parent.delete_configuration_set_tracking_options(**kwargs)
delete_custom_verification_email_template
Deletes an existing custom verification email template.
Type annotations and code completion for boto3.client("ses").delete_custom_verification_email_template
method.
boto3 documentation
def delete_custom_verification_email_template(
self,
*,
TemplateName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteCustomVerificationEmailTemplateRequestRequestTypeDef = { # (1)
"TemplateName": ...,
}
parent.delete_custom_verification_email_template(**kwargs)
delete_identity
Deletes the specified identity (an email address or a domain) from the list of verified identities.
Type annotations and code completion for boto3.client("ses").delete_identity
method.
boto3 documentation
kwargs: DeleteIdentityRequestRequestTypeDef = { # (1)
"Identity": ...,
}
parent.delete_identity(**kwargs)
delete_identity_policy
Deletes the specified sending authorization policy for the given identity (an email address or a domain).
Type annotations and code completion for boto3.client("ses").delete_identity_policy
method.
boto3 documentation
def delete_identity_policy(
self,
*,
Identity: str,
PolicyName: str,
) -> Dict[str, Any]:
...
kwargs: DeleteIdentityPolicyRequestRequestTypeDef = { # (1)
"Identity": ...,
"PolicyName": ...,
}
parent.delete_identity_policy(**kwargs)
delete_receipt_filter
Deletes the specified IP address filter.
Type annotations and code completion for boto3.client("ses").delete_receipt_filter
method.
boto3 documentation
kwargs: DeleteReceiptFilterRequestRequestTypeDef = { # (1)
"FilterName": ...,
}
parent.delete_receipt_filter(**kwargs)
delete_receipt_rule
Deletes the specified receipt rule.
Type annotations and code completion for boto3.client("ses").delete_receipt_rule
method.
boto3 documentation
def delete_receipt_rule(
self,
*,
RuleSetName: str,
RuleName: str,
) -> Dict[str, Any]:
...
kwargs: DeleteReceiptRuleRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
"RuleName": ...,
}
parent.delete_receipt_rule(**kwargs)
delete_receipt_rule_set
Deletes the specified receipt rule set and all of the receipt rules it contains.
Type annotations and code completion for boto3.client("ses").delete_receipt_rule_set
method.
boto3 documentation
kwargs: DeleteReceiptRuleSetRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
}
parent.delete_receipt_rule_set(**kwargs)
delete_template
Deletes an email template.
Type annotations and code completion for boto3.client("ses").delete_template
method.
boto3 documentation
kwargs: DeleteTemplateRequestRequestTypeDef = { # (1)
"TemplateName": ...,
}
parent.delete_template(**kwargs)
delete_verified_email_address
Deprecated.
Type annotations and code completion for boto3.client("ses").delete_verified_email_address
method.
boto3 documentation
def delete_verified_email_address(
self,
*,
EmailAddress: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteVerifiedEmailAddressRequestRequestTypeDef = { # (1)
"EmailAddress": ...,
}
parent.delete_verified_email_address(**kwargs)
describe_active_receipt_rule_set
Returns the metadata and receipt rules for the receipt rule set that is currently active.
Type annotations and code completion for boto3.client("ses").describe_active_receipt_rule_set
method.
boto3 documentation
def describe_active_receipt_rule_set(
self,
) -> DescribeActiveReceiptRuleSetResponseTypeDef: # (1)
...
describe_configuration_set
Returns the details of the specified configuration set.
Type annotations and code completion for boto3.client("ses").describe_configuration_set
method.
boto3 documentation
def describe_configuration_set(
self,
*,
ConfigurationSetName: str,
ConfigurationSetAttributeNames: Sequence[ConfigurationSetAttributeType] = ..., # (1)
) -> DescribeConfigurationSetResponseTypeDef: # (2)
...
kwargs: DescribeConfigurationSetRequestRequestTypeDef = { # (1)
"ConfigurationSetName": ...,
}
parent.describe_configuration_set(**kwargs)
describe_receipt_rule
Returns the details of the specified receipt rule.
Type annotations and code completion for boto3.client("ses").describe_receipt_rule
method.
boto3 documentation
def describe_receipt_rule(
self,
*,
RuleSetName: str,
RuleName: str,
) -> DescribeReceiptRuleResponseTypeDef: # (1)
...
kwargs: DescribeReceiptRuleRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
"RuleName": ...,
}
parent.describe_receipt_rule(**kwargs)
describe_receipt_rule_set
Returns the details of the specified receipt rule set.
Type annotations and code completion for boto3.client("ses").describe_receipt_rule_set
method.
boto3 documentation
def describe_receipt_rule_set(
self,
*,
RuleSetName: str,
) -> DescribeReceiptRuleSetResponseTypeDef: # (1)
...
kwargs: DescribeReceiptRuleSetRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
}
parent.describe_receipt_rule_set(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("ses").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_account_sending_enabled
Returns the email sending status of the Amazon SES account for the current region.
Type annotations and code completion for boto3.client("ses").get_account_sending_enabled
method.
boto3 documentation
def get_account_sending_enabled(
self,
) -> GetAccountSendingEnabledResponseTypeDef: # (1)
...
get_custom_verification_email_template
Returns the custom email verification template for the template name you specify.
Type annotations and code completion for boto3.client("ses").get_custom_verification_email_template
method.
boto3 documentation
def get_custom_verification_email_template(
self,
*,
TemplateName: str,
) -> GetCustomVerificationEmailTemplateResponseTypeDef: # (1)
...
kwargs: GetCustomVerificationEmailTemplateRequestRequestTypeDef = { # (1)
"TemplateName": ...,
}
parent.get_custom_verification_email_template(**kwargs)
get_identity_dkim_attributes
Returns the current status of Easy DKIM signing for an entity.
Type annotations and code completion for boto3.client("ses").get_identity_dkim_attributes
method.
boto3 documentation
def get_identity_dkim_attributes(
self,
*,
Identities: Sequence[str],
) -> GetIdentityDkimAttributesResponseTypeDef: # (1)
...
kwargs: GetIdentityDkimAttributesRequestRequestTypeDef = { # (1)
"Identities": ...,
}
parent.get_identity_dkim_attributes(**kwargs)
get_identity_mail_from_domain_attributes
Returns the custom MAIL FROM attributes for a list of identities (email addresses : domains).
Type annotations and code completion for boto3.client("ses").get_identity_mail_from_domain_attributes
method.
boto3 documentation
def get_identity_mail_from_domain_attributes(
self,
*,
Identities: Sequence[str],
) -> GetIdentityMailFromDomainAttributesResponseTypeDef: # (1)
...
kwargs: GetIdentityMailFromDomainAttributesRequestRequestTypeDef = { # (1)
"Identities": ...,
}
parent.get_identity_mail_from_domain_attributes(**kwargs)
get_identity_notification_attributes
Given a list of verified identities (email addresses and/or domains), returns a structure describing identity notification attributes.
Type annotations and code completion for boto3.client("ses").get_identity_notification_attributes
method.
boto3 documentation
def get_identity_notification_attributes(
self,
*,
Identities: Sequence[str],
) -> GetIdentityNotificationAttributesResponseTypeDef: # (1)
...
kwargs: GetIdentityNotificationAttributesRequestRequestTypeDef = { # (1)
"Identities": ...,
}
parent.get_identity_notification_attributes(**kwargs)
get_identity_policies
Returns the requested sending authorization policies for the given identity (an email address or a domain).
Type annotations and code completion for boto3.client("ses").get_identity_policies
method.
boto3 documentation
def get_identity_policies(
self,
*,
Identity: str,
PolicyNames: Sequence[str],
) -> GetIdentityPoliciesResponseTypeDef: # (1)
...
kwargs: GetIdentityPoliciesRequestRequestTypeDef = { # (1)
"Identity": ...,
"PolicyNames": ...,
}
parent.get_identity_policies(**kwargs)
get_identity_verification_attributes
Given a list of identities (email addresses and/or domains), returns the verification status and (for domain identities) the verification token for each identity.
Type annotations and code completion for boto3.client("ses").get_identity_verification_attributes
method.
boto3 documentation
def get_identity_verification_attributes(
self,
*,
Identities: Sequence[str],
) -> GetIdentityVerificationAttributesResponseTypeDef: # (1)
...
kwargs: GetIdentityVerificationAttributesRequestRequestTypeDef = { # (1)
"Identities": ...,
}
parent.get_identity_verification_attributes(**kwargs)
get_send_quota
Provides the sending limits for the Amazon SES account.
Type annotations and code completion for boto3.client("ses").get_send_quota
method.
boto3 documentation
get_send_statistics
Provides sending statistics for the current AWS Region.
Type annotations and code completion for boto3.client("ses").get_send_statistics
method.
boto3 documentation
get_template
Displays the template object (which includes the Subject line, HTML part and text part) for the template you specify.
Type annotations and code completion for boto3.client("ses").get_template
method.
boto3 documentation
def get_template(
self,
*,
TemplateName: str,
) -> GetTemplateResponseTypeDef: # (1)
...
kwargs: GetTemplateRequestRequestTypeDef = { # (1)
"TemplateName": ...,
}
parent.get_template(**kwargs)
list_configuration_sets
Provides a list of the configuration sets associated with your Amazon SES account in the current AWS Region.
Type annotations and code completion for boto3.client("ses").list_configuration_sets
method.
boto3 documentation
def list_configuration_sets(
self,
*,
NextToken: str = ...,
MaxItems: int = ...,
) -> ListConfigurationSetsResponseTypeDef: # (1)
...
kwargs: ListConfigurationSetsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_configuration_sets(**kwargs)
list_custom_verification_email_templates
Lists the existing custom verification email templates for your account in the current AWS Region.
Type annotations and code completion for boto3.client("ses").list_custom_verification_email_templates
method.
boto3 documentation
def list_custom_verification_email_templates(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListCustomVerificationEmailTemplatesResponseTypeDef: # (1)
...
kwargs: ListCustomVerificationEmailTemplatesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_custom_verification_email_templates(**kwargs)
list_identities
Returns a list containing all of the identities (email addresses and domains) for your AWS account in the current AWS Region, regardless of verification status.
Type annotations and code completion for boto3.client("ses").list_identities
method.
boto3 documentation
def list_identities(
self,
*,
IdentityType: IdentityTypeType = ..., # (1)
NextToken: str = ...,
MaxItems: int = ...,
) -> ListIdentitiesResponseTypeDef: # (2)
...
kwargs: ListIdentitiesRequestRequestTypeDef = { # (1)
"IdentityType": ...,
}
parent.list_identities(**kwargs)
list_identity_policies
Returns a list of sending authorization policies that are attached to the given identity (an email address or a domain).
Type annotations and code completion for boto3.client("ses").list_identity_policies
method.
boto3 documentation
def list_identity_policies(
self,
*,
Identity: str,
) -> ListIdentityPoliciesResponseTypeDef: # (1)
...
kwargs: ListIdentityPoliciesRequestRequestTypeDef = { # (1)
"Identity": ...,
}
parent.list_identity_policies(**kwargs)
list_receipt_filters
Lists the IP address filters associated with your AWS account in the current AWS Region.
Type annotations and code completion for boto3.client("ses").list_receipt_filters
method.
boto3 documentation
list_receipt_rule_sets
Lists the receipt rule sets that exist under your AWS account in the current AWS Region.
Type annotations and code completion for boto3.client("ses").list_receipt_rule_sets
method.
boto3 documentation
def list_receipt_rule_sets(
self,
*,
NextToken: str = ...,
) -> ListReceiptRuleSetsResponseTypeDef: # (1)
...
kwargs: ListReceiptRuleSetsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_receipt_rule_sets(**kwargs)
list_templates
Lists the email templates present in your Amazon SES account in the current AWS Region.
Type annotations and code completion for boto3.client("ses").list_templates
method.
boto3 documentation
def list_templates(
self,
*,
NextToken: str = ...,
MaxItems: int = ...,
) -> ListTemplatesResponseTypeDef: # (1)
...
kwargs: ListTemplatesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_templates(**kwargs)
list_verified_email_addresses
Deprecated.
Type annotations and code completion for boto3.client("ses").list_verified_email_addresses
method.
boto3 documentation
def list_verified_email_addresses(
self,
) -> ListVerifiedEmailAddressesResponseTypeDef: # (1)
...
put_configuration_set_delivery_options
Adds or updates the delivery options for a configuration set.
Type annotations and code completion for boto3.client("ses").put_configuration_set_delivery_options
method.
boto3 documentation
def put_configuration_set_delivery_options(
self,
*,
ConfigurationSetName: str,
DeliveryOptions: DeliveryOptionsTypeDef = ..., # (1)
) -> Dict[str, Any]:
...
kwargs: PutConfigurationSetDeliveryOptionsRequestRequestTypeDef = { # (1)
"ConfigurationSetName": ...,
}
parent.put_configuration_set_delivery_options(**kwargs)
put_identity_policy
Adds or updates a sending authorization policy for the specified identity (an email address or a domain).
Type annotations and code completion for boto3.client("ses").put_identity_policy
method.
boto3 documentation
def put_identity_policy(
self,
*,
Identity: str,
PolicyName: str,
Policy: str,
) -> Dict[str, Any]:
...
kwargs: PutIdentityPolicyRequestRequestTypeDef = { # (1)
"Identity": ...,
"PolicyName": ...,
"Policy": ...,
}
parent.put_identity_policy(**kwargs)
reorder_receipt_rule_set
Reorders the receipt rules within a receipt rule set.
Type annotations and code completion for boto3.client("ses").reorder_receipt_rule_set
method.
boto3 documentation
def reorder_receipt_rule_set(
self,
*,
RuleSetName: str,
RuleNames: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: ReorderReceiptRuleSetRequestRequestTypeDef = { # (1)
"RuleSetName": ...,
"RuleNames": ...,
}
parent.reorder_receipt_rule_set(**kwargs)
send_bounce
Generates and sends a bounce message to the sender of an email you received through Amazon SES.
Type annotations and code completion for boto3.client("ses").send_bounce
method.
boto3 documentation
def send_bounce(
self,
*,
OriginalMessageId: str,
BounceSender: str,
BouncedRecipientInfoList: Sequence[BouncedRecipientInfoTypeDef], # (1)
Explanation: str = ...,
MessageDsn: MessageDsnTypeDef = ..., # (2)
BounceSenderArn: str = ...,
) -> SendBounceResponseTypeDef: # (3)
...
kwargs: SendBounceRequestRequestTypeDef = { # (1)
"OriginalMessageId": ...,
"BounceSender": ...,
"BouncedRecipientInfoList": ...,
}
parent.send_bounce(**kwargs)
send_bulk_templated_email
Composes an email message to multiple destinations.
Type annotations and code completion for boto3.client("ses").send_bulk_templated_email
method.