AWS SDK 또는 CLI와 함께 DeleteVaultNotifications 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

AWS SDK 또는 CLI와 함께 DeleteVaultNotifications 사용

다음 코드 예시는 DeleteVaultNotifications의 사용 방법을 보여 줍니다.

CLI
AWS CLI

저장소에 대한 SNS 알림 제거

다음 delete-vault-notifications 예시에서는 지정된 볼트에 대해 Amazon Simple Notification Service(SNS)에서 전송한 알림을 제거합니다.

aws glacier delete-vault-notifications \ --account-id 111122223333 \ --vault-name example_vault

이 명령은 출력을 생성하지 않습니다.

Python
SDK for Python (Boto3)
참고

GitHub에 더 많은 내용이 있습니다. AWS 코드 예제 리포지토리에서 전체 예제를 찾고 설정 및 실행하는 방법을 배워보세요.

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