bucket_notifications
Creates, updates, deletes, gets or lists a bucket_notifications resource.
Overview
| Name | bucket_notifications |
| Type | Resource |
| Id | aws.s3.bucket_notifications |
Fields
The following fields are returned by SELECT queries:
- get_bucket_notification
| Name | Datatype | Description |
|---|---|---|
cloud_function_configuration | string | Container for specifying the Lambda notification configuration. |
queue_configuration | string | This 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_configuration | string | This 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_bucket_notification | select | bucket, region | x-amz-expected-bucket-owner | This operation is not supported for directory buckets. No longer used, see GetBucketNotificationConfiguration. |
put_bucket_notification | replace | bucket, region, NotificationConfiguration | Content-MD5, x-amz-sdk-checksum-algorithm, x-amz-expected-bucket-owner | This 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.
| Name | Datatype | Description |
|---|---|---|
bucket | string | The name of the bucket. |
region | string | AWS region (default: us-east-1) |
Content-MD5 | string | The 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-owner | string | The 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-algorithm | string | Indicates 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
- get_bucket_notification
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
- put_bucket_notification
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}}';