Interface LifecycleRule.Builder

    • Method Detail

      • expiration

        LifecycleRule.Builder expiration​(LifecycleExpiration expiration)

        Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.

        Parameters:
        expiration - Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • id

        LifecycleRule.Builder id​(String id)

        Unique identifier for the rule. The value cannot be longer than 255 characters.

        Parameters:
        id - Unique identifier for the rule. The value cannot be longer than 255 characters.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • filter

        LifecycleRule.Builder filter​(LifecycleRuleFilter filter)

        The container for the filter of lifecycle rule.

        Parameters:
        filter - The container for the filter of lifecycle rule.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • status

        LifecycleRule.Builder status​(String status)

        If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.

        Parameters:
        status - If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ExpirationStatus, ExpirationStatus
      • status

        LifecycleRule.Builder status​(ExpirationStatus status)

        If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.

        Parameters:
        status - If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ExpirationStatus, ExpirationStatus
      • transitions

        LifecycleRule.Builder transitions​(Collection<Transition> transitions)

        Specifies when an Amazon S3 object transitions to a specified storage class.

        This is not supported by Amazon S3 on Outposts buckets.

        Parameters:
        transitions - Specifies when an Amazon S3 object transitions to a specified storage class.

        This is not supported by Amazon S3 on Outposts buckets.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • transitions

        LifecycleRule.Builder transitions​(Transition... transitions)

        Specifies when an Amazon S3 object transitions to a specified storage class.

        This is not supported by Amazon S3 on Outposts buckets.

        Parameters:
        transitions - Specifies when an Amazon S3 object transitions to a specified storage class.

        This is not supported by Amazon S3 on Outposts buckets.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • transitions

        LifecycleRule.Builder transitions​(Consumer<Transition.Builder>... transitions)

        Specifies when an Amazon S3 object transitions to a specified storage class.

        This is not supported by Amazon S3 on Outposts buckets.

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

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #transitions(List).

        Parameters:
        transitions - a consumer that will call methods on Transition.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #transitions(java.util.Collection)
      • noncurrentVersionTransitions

        LifecycleRule.Builder noncurrentVersionTransitions​(Collection<NoncurrentVersionTransition> noncurrentVersionTransitions)

        Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.

        This is not supported by Amazon S3 on Outposts buckets.

        Parameters:
        noncurrentVersionTransitions - Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.

        This is not supported by Amazon S3 on Outposts buckets.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • noncurrentVersionTransitions

        LifecycleRule.Builder noncurrentVersionTransitions​(NoncurrentVersionTransition... noncurrentVersionTransitions)

        Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.

        This is not supported by Amazon S3 on Outposts buckets.

        Parameters:
        noncurrentVersionTransitions - Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.

        This is not supported by Amazon S3 on Outposts buckets.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • noncurrentVersionTransitions

        LifecycleRule.Builder noncurrentVersionTransitions​(Consumer<NoncurrentVersionTransition.Builder>... noncurrentVersionTransitions)

        Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime.

        This is not supported by Amazon S3 on Outposts buckets.

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

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #noncurrentVersionTransitions(List).

        Parameters:
        noncurrentVersionTransitions - a consumer that will call methods on NoncurrentVersionTransition.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #noncurrentVersionTransitions(java.util.Collection)
      • noncurrentVersionExpiration

        LifecycleRule.Builder noncurrentVersionExpiration​(NoncurrentVersionExpiration noncurrentVersionExpiration)

        The noncurrent version expiration of the lifecycle rule.

        Parameters:
        noncurrentVersionExpiration - The noncurrent version expiration of the lifecycle rule.
        Returns:
        Returns a reference to this object so that method calls can be chained together.