まだまだありますAWSSDK のサンプルは以下にあります。AWSドキュメント SDK サンプル
翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
AWS SDKを使用して Amazon S3 Glacier ボールト通知設定を取得します。
次のコード例は、Amazon S3 Glacier ボールト通知の設定を取得する方法を示しています。
- 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 get_notification(vault): """ Gets the currently notification configuration for a vault. :param vault: The vault to query. :return: The notification configuration for the specified vault. """ try: notification = vault.Notification() logger.info( "Vault %s notifies %s on %s events.", vault.name, notification.sns_topic, notification.events) except ClientError: logger.exception("Couldn't get notification data for %s.", vault.name) raise else: return notification
-
API の詳細については、を参照してください。GetVaultNotificationsにAWSPython (ボト3) 用 SDK API リファレンス。
-
ジョブの出力の取得
ジョブのリスト表示