Package com.amazonaws.services.s3.model
Class NotificationConfiguration
- java.lang.Object
-
- com.amazonaws.services.s3.model.NotificationConfiguration
-
- Direct Known Subclasses:
CloudFunctionConfiguration,LambdaConfiguration,QueueConfiguration,TopicConfiguration
public abstract class NotificationConfiguration extends Object
An abstract class for all the notification configurations associated with an Amazon S3 bucket.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNotificationConfiguration()Creates a NotificationConfiguration with empty events and prefixes.protectedNotificationConfiguration(String... events)Creates a notification configuration with the given set of events.protectedNotificationConfiguration(EnumSet<S3Event> events)Creates a notification configuration with the given set of events.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddEvent(S3Event event)Adds the given event to the set of events for thisNotificationConfigurationobject.voidaddEvent(String event)Adds the given event to the set of events for thisNotificationConfigurationobject.voidaddObjectPrefix(String prefix)Deprecated.This field is not used by S3.Set<String>getEvents()Returns the set of events associated with this notification configuration.FiltergetFilter()Filter criteria for determining which S3 objects trigger event notifications.List<String>getObjectPrefixes()Deprecated.This field is not used by S3.voidsetEvents(Set<String> events)Sets the given events in thisNotificationConfigurationobject.voidsetFilter(Filter filter)Sets the filter criteria for thisNotificationConfiguration.voidsetObjectPrefixes(List<String> objectPrefixes)Deprecated.This field is not used by S3.NotificationConfigurationwithEvents(Set<String> events)Sets the given events in thisNotificationConfigurationobject and returns this object.NotificationConfigurationwithFilter(Filter filter)Sets the filter criteria for thisNotificationConfigurationand returns this object for method chaining.NotificationConfigurationwithObjectPrefixes(String... objectPrefixes)Deprecated.This field is not used by S3.
-
-
-
Constructor Detail
-
NotificationConfiguration
protected NotificationConfiguration()
Creates a NotificationConfiguration with empty events and prefixes.
-
NotificationConfiguration
protected NotificationConfiguration(EnumSet<S3Event> events)
Creates a notification configuration with the given set of events.- Parameters:
events- the list of events for the notification configuration.
-
NotificationConfiguration
protected NotificationConfiguration(String... events)
Creates a notification configuration with the given set of events.- Parameters:
events- the list of events for the notification configuration.
-
-
Method Detail
-
getEvents
public Set<String> getEvents()
Returns the set of events associated with this notification configuration.
-
setEvents
public void setEvents(Set<String> events)
Sets the given events in thisNotificationConfigurationobject.- Parameters:
events- the set of events for the notification configuration.
-
getObjectPrefixes
@Deprecated public List<String> getObjectPrefixes()
Deprecated.This field is not used by S3. It will be removed in the next major version of the SDK. SeegetFilter()for the correct way to filter notifications.
-
setObjectPrefixes
@Deprecated public void setObjectPrefixes(List<String> objectPrefixes)
Deprecated.This field is not used by S3. It will be removed in the next major version of the SDK. SeesetFilter(Filter)for the correct way to filter notifications.
-
withEvents
public NotificationConfiguration withEvents(Set<String> events)
Sets the given events in thisNotificationConfigurationobject and returns this object.- Parameters:
events- the set of events for the notification configuration.
-
withObjectPrefixes
@Deprecated public NotificationConfiguration withObjectPrefixes(String... objectPrefixes)
Deprecated.This field is not used by S3. It will be removed in the next major version of the SDK. SeewithFilter(Filter)for the correct way to filter notifications.
-
addEvent
public void addEvent(String event)
Adds the given event to the set of events for thisNotificationConfigurationobject.- Parameters:
event- the event to add to this notification configuration
-
addEvent
public void addEvent(S3Event event)
Adds the given event to the set of events for thisNotificationConfigurationobject.- Parameters:
event- the event to add to this notification configuration
-
addObjectPrefix
@Deprecated public void addObjectPrefix(String prefix)
Deprecated.This field is not used by S3. It will be removed in the next major version of the SDK
-
getFilter
public Filter getFilter()
Filter criteria for determining which S3 objects trigger event notifications.- Returns:
Filterobject associated with thisNotificationConfiguration
-
setFilter
public void setFilter(Filter filter)
Sets the filter criteria for thisNotificationConfiguration.- Parameters:
filter- NewFilter
-
withFilter
public NotificationConfiguration withFilter(Filter filter)
Sets the filter criteria for thisNotificationConfigurationand returns this object for method chaining.- Parameters:
filter- NewFilter- Returns:
- This object for method chaining
-
-