Interface DefaultRetention.Builder

  • Method Details

    • mode

      The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either Days or Years.

      Parameters:
      mode - The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either Days or Years.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • mode

      The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either Days or Years.

      Parameters:
      mode - The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either Days or Years.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • days

      The number of days that you want to specify for the default retention period. Must be used with Mode.

      Parameters:
      days - The number of days that you want to specify for the default retention period. Must be used with Mode.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • years

      The number of years that you want to specify for the default retention period. Must be used with Mode.

      Parameters:
      years - The number of years that you want to specify for the default retention period. Must be used with Mode.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • defaultEventHold

      DefaultRetention.Builder defaultEventHold(EventHoldDuration defaultEventHold)

      The default event hold duration to be applied to new objects placed in the specified bucket. When configured, new objects will automatically have an event hold enabled with this duration.

      Parameters:
      defaultEventHold - The default event hold duration to be applied to new objects placed in the specified bucket. When configured, new objects will automatically have an event hold enabled with this duration.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • defaultEventHold

      default DefaultRetention.Builder defaultEventHold(Consumer<EventHoldDuration.Builder> defaultEventHold)

      The default event hold duration to be applied to new objects placed in the specified bucket. When configured, new objects will automatically have an event hold enabled with this duration.

      This is a convenience method that creates an instance of the EventHoldDuration.Builder avoiding the need to create one manually via EventHoldDuration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to defaultEventHold(EventHoldDuration).

      Parameters:
      defaultEventHold - a consumer that will call methods on EventHoldDuration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: