|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.services.s3.model.BucketNotificationConfiguration
public class BucketNotificationConfiguration
Represents a bucket's notification configuration. The notification configuration is used to control reception of notifications for specific events for Amazon S3 buckets.
Using SNS as the delivery service, the notification configuration of an Amazon S3 bucket provides near real-time notifications of events the user is interested in. Notification is turned on by enabling configuration on a bucket, specifying the events and the SNS topic. This configuration can only be turned on by the bucket owner.
If a notification configuration already exists for the
specified bucket, the new notification configuration will replace the existing
notification configuration. To remove a notification configuration, pass an
an empty configuration directly to
AmazonS3.setBucketNotificationConfiguration(String,BucketNotificationConfiguration)
.
Note: Currently buckets may only have a single event and topic configuration.
AmazonS3.getBucketNotificationConfiguration(String)
,
AmazonS3.setBucketNotificationConfiguration(String, BucketNotificationConfiguration)
Nested Class Summary | |
---|---|
static class |
BucketNotificationConfiguration.TopicConfiguration
Represents the SNS topic to publish event notification to. |
Constructor Summary | |
---|---|
BucketNotificationConfiguration()
Creates a new bucket notification configuration. |
|
BucketNotificationConfiguration(Collection<BucketNotificationConfiguration.TopicConfiguration> topicConfigurations)
Creates a new bucket notification configuration containing the specified TopicConfigurations . |
Method Summary | |
---|---|
List<BucketNotificationConfiguration.TopicConfiguration> |
getTopicConfigurations()
Gets the list of BucketNotificationConfiguration.TopicConfiguration objects
contained in this object. |
void |
setTopicConfigurations(Collection<BucketNotificationConfiguration.TopicConfiguration> topicConfigurations)
Sets the BucketNotificationConfiguration.TopicConfiguration . |
String |
toString()
|
BucketNotificationConfiguration |
withTopicConfigurations(BucketNotificationConfiguration.TopicConfiguration... topicConfigurations)
Sets the BucketNotificationConfiguration.TopicConfiguration
TopicConfigurations and returns this object,
enabling additional method calls to be chained together. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BucketNotificationConfiguration()
Creates a new bucket notification configuration. By default, the newly created configuration is empty.
Passing the new configuration directly to
AmazonS3.setBucketNotificationConfiguration(String,BucketNotificationConfiguration)
will remove any existing bucket notification configuration.
BucketNotificationConfiguration(Collection)
public BucketNotificationConfiguration(Collection<BucketNotificationConfiguration.TopicConfiguration> topicConfigurations)
Creates a new bucket notification configuration containing the specified
TopicConfigurations
.
Passing the new configuration directly to
AmazonS3.setBucketNotificationConfiguration(String,BucketNotificationConfiguration)
will set the bucket's notification configuration and overwrite any existing configuration.
BucketNotificationConfiguration()
Method Detail |
---|
public BucketNotificationConfiguration withTopicConfigurations(BucketNotificationConfiguration.TopicConfiguration... topicConfigurations)
Sets the BucketNotificationConfiguration.TopicConfiguration
TopicConfigurations
and returns this object,
enabling additional method calls to be chained together.
Calling this method will overwrite any
previously set TopicConfigurations
for this object.
topicConfigurations
- A set of topic configurations.
BucketNotificationConfiguration
object,
enabling additional method calls to be chained together.setTopicConfigurations(Collection)
public void setTopicConfigurations(Collection<BucketNotificationConfiguration.TopicConfiguration> topicConfigurations)
Sets the BucketNotificationConfiguration.TopicConfiguration
.
Calling this method will overwrite any
previously set TopicConfigurations
for this object.
topicConfigurations
- A collection of topic configurations.BucketNotificationConfiguration#withTopicConfigurations(TopicConfiguration)
public List<BucketNotificationConfiguration.TopicConfiguration> getTopicConfigurations()
Gets the list of BucketNotificationConfiguration.TopicConfiguration
objects
contained in this object. This method may return an empty list if no TopicConfiguration
objects are present.
TopicConfiguration
objects contained in this object.
May return an empty list.public String toString()
toString
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |