Returns the notification configuration of a bucket.
If notifications are not enabled on the bucket, the action returns an empty
NotificationConfiguration element.
By default, you must be the bucket owner to read the notification configuration of a
bucket. However, the bucket owner can use a bucket policy to grant permission to other
users to read this configuration with the s3:GetBucketNotification
permission.
Returns the notification configuration of a bucket.
If notifications are not enabled on the bucket, the action returns an empty
NotificationConfiguration
element.By default, you must be the bucket owner to read the notification configuration of a bucket. However, the bucket owner can use a bucket policy to grant permission to other users to read this configuration with the
s3:GetBucketNotification
permission.For more information about setting and reading the notification configuration on a bucket, see Setting Up Notification of Bucket Events. For more information about bucket policies, see Using Bucket Policies.
The following action is related to
GetBucketNotification
:PutBucketNotification
Use a bare-bones client and the command you need to make an API call.
import { S3Client, GetBucketNotificationConfigurationCommand } from "@aws-sdk/client-s3"; // ES Modules import // const { S3Client, GetBucketNotificationConfigurationCommand } = require("@aws-sdk/client-s3"); // CommonJS import const client = new S3Client(config); const command = new GetBucketNotificationConfigurationCommand(input); const response = await client.send(command);
GetBucketNotificationConfigurationCommandInput for command's
input
shape.GetBucketNotificationConfigurationCommandOutput for command's
response
shape.config for S3Client's
config
shape.