Class: AWSCDK::S3::CfnBucket::TransitionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3/cfn_bucket.rb

Overview

Specifies when an object transitions to a specified storage class.

For more information about Amazon S3 lifecycle configuration rules, see Transitioning Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(storage_class:, transition_date: nil, transition_in_days: nil) ⇒ TransitionProperty

Returns a new instance of TransitionProperty.

Parameters:

  • storage_class (String)

    The storage class to which you want the object to transition.

  • transition_date (DateTime, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates when objects are transitioned to the specified storage class.

  • transition_in_days (Numeric, nil) (defaults to: nil)

    Indicates the number of days after creation when objects are transitioned to the specified storage class.



4674
4675
4676
4677
4678
4679
4680
4681
# File 's3/cfn_bucket.rb', line 4674

def initialize(storage_class:, transition_date: nil, transition_in_days: nil)
  @storage_class = storage_class
  Jsii::Type.check_type(@storage_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "storageClass")
  @transition_date = transition_date
  Jsii::Type.check_type(@transition_date, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiZGF0ZSJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "transitionDate") unless @transition_date.nil?
  @transition_in_days = transition_in_days
  Jsii::Type.check_type(@transition_in_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "transitionInDays") unless @transition_in_days.nil?
end

Instance Attribute Details

#storage_classString (readonly)

The storage class to which you want the object to transition.



4687
4688
4689
# File 's3/cfn_bucket.rb', line 4687

def storage_class
  @storage_class
end

#transition_dateDateTime, ... (readonly)

Indicates when objects are transitioned to the specified storage class.

The date value must be in ISO 8601 format. The time is always midnight UTC.



4694
4695
4696
# File 's3/cfn_bucket.rb', line 4694

def transition_date
  @transition_date
end

#transition_in_daysNumeric? (readonly)

Indicates the number of days after creation when objects are transitioned to the specified storage class.

If the specified storage class is INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE , valid values are 0 or positive integers. If the specified storage class is STANDARD_IA or ONEZONE_IA , valid values are positive integers greater than 30 . Be aware that some storage classes have a minimum storage duration and that you're charged for transitioning objects before their minimum storage duration. For more information, see Constraints and considerations for transitions in the Amazon S3 User Guide .



4701
4702
4703
# File 's3/cfn_bucket.rb', line 4701

def transition_in_days
  @transition_in_days
end

Class Method Details

.jsii_propertiesObject



4703
4704
4705
4706
4707
4708
4709
# File 's3/cfn_bucket.rb', line 4703

def self.jsii_properties
  {
    :storage_class => "storageClass",
    :transition_date => "transitionDate",
    :transition_in_days => "transitionInDays",
  }
end

Instance Method Details

#to_jsiiObject



4711
4712
4713
4714
4715
4716
4717
4718
4719
# File 's3/cfn_bucket.rb', line 4711

def to_jsii
  result = {}
  result.merge!({
    "storageClass" => @storage_class,
    "transitionDate" => @transition_date,
    "transitionInDays" => @transition_in_days,
  })
  result.compact
end