| Index: third_party/boto/boto/ses/connection.py
|
| ===================================================================
|
| --- third_party/boto/boto/ses/connection.py (revision 33376)
|
| +++ third_party/boto/boto/ses/connection.py (working copy)
|
| @@ -42,7 +42,7 @@
|
| is_secure=True, port=None, proxy=None, proxy_port=None,
|
| proxy_user=None, proxy_pass=None, debug=0,
|
| https_connection_factory=None, region=None, path='/',
|
| - security_token=None, validate_certs=True):
|
| + security_token=None, validate_certs=True, profile_name=None):
|
| if not region:
|
| region = RegionInfo(self, self.DefaultRegionName,
|
| self.DefaultRegionEndpoint)
|
| @@ -53,7 +53,8 @@
|
| proxy_user, proxy_pass, debug,
|
| https_connection_factory, path,
|
| security_token=security_token,
|
| - validate_certs=validate_certs)
|
| + validate_certs=validate_certs,
|
| + profile_name=profile_name)
|
|
|
| def _required_auth_capability(self):
|
| return ['ses']
|
| @@ -520,3 +521,46 @@
|
| return self._make_request('DeleteIdentity', {
|
| 'Identity': identity,
|
| })
|
| +
|
| + def set_identity_notification_topic(self, identity, notification_type, sns_topic=None):
|
| + """Sets an SNS topic to publish bounce or complaint notifications for
|
| + emails sent with the given identity as the Source. Publishing to topics
|
| + may only be disabled when feedback forwarding is enabled.
|
| +
|
| + :type identity: string
|
| + :param identity: An email address or domain name.
|
| +
|
| + :type notification_type: string
|
| + :param notification_type: The type of feedback notifications that will
|
| + be published to the specified topic.
|
| + Valid Values: Bounce | Complaint
|
| +
|
| + :type sns_topic: string or None
|
| + :param sns_topic: The Amazon Resource Name (ARN) of the Amazon Simple
|
| + Notification Service (Amazon SNS) topic.
|
| + """
|
| + params = {
|
| + 'Identity': identity,
|
| + 'NotificationType': notification_type
|
| + }
|
| + if sns_topic:
|
| + params['SnsTopic'] = sns_topic
|
| + return self._make_request('SetIdentityNotificationTopic', params)
|
| +
|
| + def set_identity_feedback_forwarding_enabled(self, identity, forwarding_enabled=True):
|
| + """
|
| + Enables or disables SES feedback notification via email.
|
| + Feedback forwarding may only be disabled when both complaint and
|
| + bounce topics are set.
|
| +
|
| + :type identity: string
|
| + :param identity: An email address or domain name.
|
| +
|
| + :type forwarding_enabled: bool
|
| + :param forwarding_enabled: Specifies whether or not to enable feedback forwarding.
|
| + """
|
| + return self._make_request('SetIdentityFeedbackForwardingEnabled', {
|
| + 'Identity': identity,
|
| + 'ForwardingEnabled': 'true' if forwarding_enabled else 'false'
|
| + })
|
| +
|
|
|