Skip to main content

bucket_notifications

Creates, updates, deletes, gets or lists a bucket_notifications resource.

Overview

Namebucket_notifications
TypeResource
Idaws.s3.bucket_notifications

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cloud_function_configurationstringContainer for specifying the Lambda notification configuration.
queue_configurationstringThis data type is deprecated. This data type specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.
topic_configurationstringThis data type is deprecated. A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_bucket_notificationselectbucket, regionx-amz-expected-bucket-ownerThis operation is not supported for directory buckets. No longer used, see GetBucketNotificationConfiguration.
put_bucket_notificationreplacebucket, region, NotificationConfigurationContent-MD5, x-amz-sdk-checksum-algorithm, x-amz-expected-bucket-ownerThis operation is not supported for directory buckets. No longer used, see the PutBucketNotificationConfiguration operation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
bucketstringThe name of the bucket.
regionstringAWS region (default: us-east-1)
Content-MD5stringThe MD5 hash of the PutPublicAccessBlock request body. For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
x-amz-expected-bucket-ownerstringThe account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).
x-amz-sdk-checksum-algorithmstringIndicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

SELECT examples

This operation is not supported for directory buckets. No longer used, see GetBucketNotificationConfiguration.

SELECT
cloud_function_configuration,
queue_configuration,
topic_configuration
FROM aws.s3.bucket_notifications
WHERE bucket = '{{ bucket }}' -- required
AND region = '{{ region }}' -- required
AND `x-amz-expected-bucket-owner` = '{{ x-amz-expected-bucket-owner }}'
;

REPLACE examples

This operation is not supported for directory buckets. No longer used, see the PutBucketNotificationConfiguration operation.

REPLACE aws.s3.bucket_notifications
SET
NotificationConfiguration = '{{ NotificationConfiguration }}'
WHERE
bucket = '{{ bucket }}' --required
AND region = '{{ region }}' --required
AND NotificationConfiguration = '{{ NotificationConfiguration }}' --required
AND `Content-MD5` = '{{ Content-MD5}}'
AND `x-amz-sdk-checksum-algorithm` = '{{ x-amz-sdk-checksum-algorithm}}'
AND `x-amz-expected-bucket-owner` = '{{ x-amz-expected-bucket-owner}}';