Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: third_party/boto/boto/ses/connection.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/boto/boto/ses/__init__.py ('k') | third_party/boto/boto/sns/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'
+ })
+
« no previous file with comments | « third_party/boto/boto/ses/__init__.py ('k') | third_party/boto/boto/sns/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698