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 Details

    • 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 Details

    • 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 this NotificationConfiguration 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. See getFilter() 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. See setFilter(Filter) for the correct way to filter notifications.
    • withEvents

      public NotificationConfiguration withEvents(Set<String> events)
      Sets the given events in this NotificationConfiguration 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. See withFilter(Filter) for the correct way to filter notifications.
    • addEvent

      public void addEvent(String event)
      Adds the given event to the set of events for this NotificationConfiguration 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 this NotificationConfiguration 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 this NotificationConfiguration
    • setFilter

      public void setFilter(Filter filter)
      Sets the filter criteria for this NotificationConfiguration.
      Parameters:
      filter - New Filter
    • withFilter

      public NotificationConfiguration withFilter(Filter filter)
      Sets the filter criteria for this NotificationConfiguration and returns this object for method chaining.
      Parameters:
      filter - New Filter
      Returns:
      This object for method chaining