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 protected
NotificationConfiguration()
Creates a NotificationConfiguration with empty events and prefixes.protected
NotificationConfiguration(String... events)
Creates a notification configuration with the given set of events.protected
NotificationConfiguration(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 void
addEvent(S3Event event)
Adds the given event to the set of events for thisNotificationConfiguration
object.void
addEvent(String event)
Adds the given event to the set of events for thisNotificationConfiguration
object.void
addObjectPrefix(String prefix)
Deprecated.This field is not used by S3.Set<String>
getEvents()
Returns the set of events associated with this notification configuration.Filter
getFilter()
Filter criteria for determining which S3 objects trigger event notifications.List<String>
getObjectPrefixes()
Deprecated.This field is not used by S3.void
setEvents(Set<String> events)
Sets the given events in thisNotificationConfiguration
object.void
setFilter(Filter filter)
Sets the filter criteria for thisNotificationConfiguration
.void
setObjectPrefixes(List<String> objectPrefixes)
Deprecated.This field is not used by S3.NotificationConfiguration
withEvents(Set<String> events)
Sets the given events in thisNotificationConfiguration
object and returns this object.NotificationConfiguration
withFilter(Filter filter)
Sets the filter criteria for thisNotificationConfiguration
and returns this object for method chaining.NotificationConfiguration
withObjectPrefixes(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 thisNotificationConfiguration
object.- 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 thisNotificationConfiguration
object 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 thisNotificationConfiguration
object.- 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 thisNotificationConfiguration
object.- 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:
Filter
object 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 thisNotificationConfiguration
and returns this object for method chaining.- Parameters:
filter
- NewFilter
- Returns:
- This object for method chaining
-
-