Amazon Simple Storage Service
API Reference (API Version 2006-03-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

GET Bucket notification

Description

This implementation of the GET operation uses the notification subresource to return the notification configuration of a bucket. Currently, the s3:ReducedRedundancyLostObject event is the only event supported for notifications. The s3:ReducedRedundancyLostObject event is triggered when Amazon S3 detects that it has lost all replicas of a Reduced Redundancy Storage object and can no longer service requests for that object.

If notifications are not enabled on the bucket, the operation returns an empty NotificatonConfiguration 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.

Requests

Syntax

GET /?notification HTTP/1.1
Host: BucketName.s3.amazonaws.com
Date: date
Authorization: signatureValue

Request Parameters

This implementation of the operation does not use request parameters.

Request Headers

This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.

Request Elements

This implementation of the operation does not use request elements.

Responses

Response Headers

This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.

Response Elements

Name Description
NotificationConfiguration

Container for specifying the notification configuration of the bucket. If this element is empty, the bucket's notifications are turned off.

Type: Container

Children: TopicConfiguration

Ancestry: None

TopicConfiguration

Container for specifying the topic configuration for the notification. Currently, only one topic can be configured for notifications.

Type: Container

Children: Topic, Event

Ancestry: NotificationConfiguration

Topic

Amazon SNS topic to which Amazon S3 will publish a message to report the specified events for the bucket.

Type: String

Ancestry: TopicConfiguration

Event

Bucket event to send notifications for. Currently, s3:ReducedRedundancyLostObject is the only event supported for notifications.

Type: String

Valid Values: s3:ReducedRedundancyLostObject

Ancestry: TopicConfiguration

Special Errors

This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.

Examples

Sample Request

This request returns the notification configuration on bucket quotes.s3.amazonaws.com.

GET ?notification HTTP/1.1 
Host: quotes.s3.amazonaws.com
Date: Wed, 09 June 2010 12:00:00 GMT
Authorization: AWS AKIAIOSFODNN7EXAMPLE:xQE0diMbLRepdf3YB+FIEXAMPLE=
			

Sample Response

This response returns that the notification configuration for the specified bucket.

HTTP/1.1 200 OK
x-amz-id-2: YgIPIfBiKa2bj0KMgUAdQkf3ShJTOOpXUueF6QKo
x-amz-request-id: 236A8905248E5A02
Date: Wed, 02 June 2010 12:00:00 GMT
Connection: close
Server: AmazonS3
<NotificationConfiguration> 
   <TopicConfiguration>
       <Topic>arn:aws:sns:us-east-1:123456789012:myTopic</Topic>
       <Event>s3:ReducedRedundancyLostObject</Event>
   </TopicConfiguration>
</NotificationConfiguration>