Weitere AWS-SDK-Beispiele sind im GitHub-Repository Beispiele für AWS Doc SDKs
Verwendung von DeleteVaultNotifications mit einem AWS-SDK oder CLI
Die folgenden Code-Beispiele zeigen, wie DeleteVaultNotifications verwendet wird.
- CLI
-
- AWS CLI
-
So entfernen Sie die SNS-Benachrichtigungen für einen Tresor
Im folgenden Beispiel für
delete-vault-notificationswerden Benachrichtigungen, die von Amazon Simple Notification Service (Amazon SNS) gesendet wurden, für den angegebenen Tresor entfernt.aws glacier delete-vault-notifications \ --account-id111122223333\ --vault-nameexample_vaultMit diesem Befehl wird keine Ausgabe zurückgegeben.
-
Weitere API-Informationen finden Sie unter DeleteVaultNotifications
in der AWS CLI-Befehlsreferenz.
-
- Python
-
- SDK für Python (Boto3)
-
Anmerkung
Auf GitHub finden Sie noch mehr. Hier finden Sie das vollständige Beispiel und erfahren, wie Sie das AWS-Code-Beispiel-
einrichten und ausführen. 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-
Weitere API-Informationen finden Sie unter DeleteVaultNotifications in der API-Referenz zum AWS SDK für Python (Boto3).
-