Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Delete Amazon S3 Glacier vault notifications using an Amazon SDK
The following code example shows how to delete Amazon S3 Glacier vault notifications.
- Python
-
- SDK for Python (Boto3)
-
class GlacierWrapper:
"""Encapsulates Amazon S3 Glacier API operations."""
def __init__(self, glacier_resource):
"""
:param glacier_resource: A Boto3 Amazon S3 Glacier resource.
"""
self.glacier_resource = glacier_resource
@staticmethod
def stop_notifications(notification):
"""
Stops notifications to the configured Amazon SNS topic.
:param notification: The notification configuration to remove.
"""
try:
notification.delete()
logger.info("Notifications stopped.")
except ClientError:
logger.exception("Couldn't stop notifications.")
raise
For a complete list of Amazon SDK developer guides and code examples, see
Using S3 Glacier with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.