Class CfnBucket.RuleProperty.Builder

java.lang.Object
software.amazon.awscdk.services.s3.CfnBucket.RuleProperty.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket.RuleProperty>
Enclosing interface:
CfnBucket.RuleProperty

@Stability(Stable) public static final class CfnBucket.RuleProperty.Builder extends Object implements software.amazon.jsii.Builder<CfnBucket.RuleProperty>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • status

      @Stability(Stable) public CfnBucket.RuleProperty.Builder status(String status)
      Parameters:
      status - If Enabled , the rule is currently being applied. This parameter is required. If Disabled , the rule is not currently being applied.
      Returns:
      this
    • abortIncompleteMultipartUpload

      @Stability(Stable) public CfnBucket.RuleProperty.Builder abortIncompleteMultipartUpload(IResolvable abortIncompleteMultipartUpload)
      Parameters:
      abortIncompleteMultipartUpload - Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
      Returns:
      this
    • abortIncompleteMultipartUpload

      @Stability(Stable) public CfnBucket.RuleProperty.Builder abortIncompleteMultipartUpload(CfnBucket.AbortIncompleteMultipartUploadProperty abortIncompleteMultipartUpload)
      Parameters:
      abortIncompleteMultipartUpload - Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
      Returns:
      this
    • expirationDate

      @Stability(Stable) public CfnBucket.RuleProperty.Builder expirationDate(IResolvable expirationDate)
      Parameters:
      expirationDate - Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
      Returns:
      this
    • expirationDate

      @Stability(Stable) public CfnBucket.RuleProperty.Builder expirationDate(Instant expirationDate)
      Parameters:
      expirationDate - Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
      Returns:
      this
    • expirationInDays

      @Stability(Stable) public CfnBucket.RuleProperty.Builder expirationInDays(Number expirationInDays)
      Parameters:
      expirationInDays - Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
      Returns:
      this
    • expiredObjectDeleteMarker

      @Stability(Stable) public CfnBucket.RuleProperty.Builder expiredObjectDeleteMarker(Boolean expiredObjectDeleteMarker)
      Parameters:
      expiredObjectDeleteMarker - Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions. If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ExpirationInDays , ExpirationDate , or TagFilters .
      Returns:
      this
    • expiredObjectDeleteMarker

      @Stability(Stable) public CfnBucket.RuleProperty.Builder expiredObjectDeleteMarker(IResolvable expiredObjectDeleteMarker)
      Parameters:
      expiredObjectDeleteMarker - Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions. If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ExpirationInDays , ExpirationDate , or TagFilters .
      Returns:
      this
    • id

      @Stability(Stable) public CfnBucket.RuleProperty.Builder id(String id)
      Parameters:
      id - Unique identifier for the rule. The value can't be longer than 255 characters.
      Returns:
      this
    • noncurrentVersionExpiration

      @Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionExpiration(IResolvable noncurrentVersionExpiration)
      Parameters:
      noncurrentVersionExpiration - Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object's lifetime.
      Returns:
      this
    • noncurrentVersionExpiration

      @Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionExpiration(CfnBucket.NoncurrentVersionExpirationProperty noncurrentVersionExpiration)
      Parameters:
      noncurrentVersionExpiration - Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object's lifetime.
      Returns:
      this
    • noncurrentVersionExpirationInDays

      @Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionExpirationInDays(Number noncurrentVersionExpirationInDays)
      Parameters:
      noncurrentVersionExpirationInDays - (Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.
      Returns:
      this
    • noncurrentVersionTransition

      @Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransition(IResolvable noncurrentVersionTransition)
      Parameters:
      noncurrentVersionTransition - (Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the NoncurrentVersionTransitions property.
      Returns:
      this
    • noncurrentVersionTransition

      @Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransition(CfnBucket.NoncurrentVersionTransitionProperty noncurrentVersionTransition)
      Parameters:
      noncurrentVersionTransition - (Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the NoncurrentVersionTransitions property.
      Returns:
      this
    • noncurrentVersionTransitions

      @Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransitions(IResolvable noncurrentVersionTransitions)
      Parameters:
      noncurrentVersionTransitions - For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the NoncurrentVersionTransition property.
      Returns:
      this
    • noncurrentVersionTransitions

      @Stability(Stable) public CfnBucket.RuleProperty.Builder noncurrentVersionTransitions(List<? extends Object> noncurrentVersionTransitions)
      Parameters:
      noncurrentVersionTransitions - For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the NoncurrentVersionTransition property.
      Returns:
      this
    • objectSizeGreaterThan

      @Stability(Stable) public CfnBucket.RuleProperty.Builder objectSizeGreaterThan(Number objectSizeGreaterThan)
      Parameters:
      objectSizeGreaterThan - Specifies the minimum object size in bytes for this rule to apply to. Objects must be larger than this value in bytes. For more information about size based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .
      Returns:
      this
    • objectSizeLessThan

      @Stability(Stable) public CfnBucket.RuleProperty.Builder objectSizeLessThan(Number objectSizeLessThan)
      Parameters:
      objectSizeLessThan - Specifies the maximum object size in bytes for this rule to apply to. Objects must be smaller than this value in bytes. For more information about sized based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .
      Returns:
      this
    • prefix

      @Stability(Stable) public CfnBucket.RuleProperty.Builder prefix(String prefix)
      Parameters:
      prefix - Object key prefix that identifies one or more objects to which this rule applies.

      Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .

      Returns:
      this
    • tagFilters

      @Stability(Stable) public CfnBucket.RuleProperty.Builder tagFilters(IResolvable tagFilters)
      Parameters:
      tagFilters - Tags to use to identify a subset of objects to which the lifecycle rule applies.
      Returns:
      this
    • tagFilters

      @Stability(Stable) public CfnBucket.RuleProperty.Builder tagFilters(List<? extends Object> tagFilters)
      Parameters:
      tagFilters - Tags to use to identify a subset of objects to which the lifecycle rule applies.
      Returns:
      this
    • transition

      @Stability(Stable) public CfnBucket.RuleProperty.Builder transition(IResolvable transition)
      Parameters:
      transition - (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the Transitions property.
      Returns:
      this
    • transition

      @Stability(Stable) public CfnBucket.RuleProperty.Builder transition(CfnBucket.TransitionProperty transition)
      Parameters:
      transition - (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the Transitions property.
      Returns:
      this
    • transitions

      @Stability(Stable) public CfnBucket.RuleProperty.Builder transitions(IResolvable transitions)
      Parameters:
      transitions - One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the Transition property.
      Returns:
      this
    • transitions

      @Stability(Stable) public CfnBucket.RuleProperty.Builder transitions(List<? extends Object> transitions)
      Parameters:
      transitions - One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the Transition property.
      Returns:
      this
    • build

      @Stability(Stable) public CfnBucket.RuleProperty build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnBucket.RuleProperty>
      Returns:
      a new instance of CfnBucket.RuleProperty
      Throws:
      NullPointerException - if any required attribute was not provided