Class: AWSCDK::EFS::CfnFileSystem::LifecyclePolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
efs/cfn_file_system.rb

Overview

Describes a policy used by Lifecycle management that specifies when to transition files into and out of the EFS storage classes.

For more information, see Managing file system storage .

  • Each LifecyclePolicy object can have only a single transition. This means that in a request body, LifecyclePolicies must be structured as an array of LifecyclePolicy objects, one object for each transition, TransitionToIA , TransitionToArchive , TransitionToPrimaryStorageClass .
  • See the AWS::EFS::FileSystem examples for the correct LifecyclePolicy structure. Do not use the syntax shown on this page.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transition_to_archive: nil, transition_to_ia: nil, transition_to_primary_storage_class: nil) ⇒ LifecyclePolicyProperty

Returns a new instance of LifecyclePolicyProperty.

Parameters:

  • transition_to_archive (String, nil) (defaults to: nil)

    The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage.

  • transition_to_ia (String, nil) (defaults to: nil)

    The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Infrequent Access (IA) storage.

  • transition_to_primary_storage_class (String, nil) (defaults to: nil)

    Whether to move files back to primary (Standard) storage after they are accessed in IA or Archive storage.



845
846
847
848
849
850
851
852
# File 'efs/cfn_file_system.rb', line 845

def initialize(transition_to_archive: nil, transition_to_ia: nil, transition_to_primary_storage_class: nil)
  @transition_to_archive = transition_to_archive
  Jsii::Type.check_type(@transition_to_archive, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transitionToArchive") unless @transition_to_archive.nil?
  @transition_to_ia = transition_to_ia
  Jsii::Type.check_type(@transition_to_ia, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transitionToIa") unless @transition_to_ia.nil?
  @transition_to_primary_storage_class = transition_to_primary_storage_class
  Jsii::Type.check_type(@transition_to_primary_storage_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transitionToPrimaryStorageClass") unless @transition_to_primary_storage_class.nil?
end

Instance Attribute Details

#transition_to_archiveString? (readonly)

The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage.

Metadata operations such as listing the contents of a directory don't count as file access events.



860
861
862
# File 'efs/cfn_file_system.rb', line 860

def transition_to_archive
  @transition_to_archive
end

#transition_to_iaString? (readonly)

The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Infrequent Access (IA) storage.

Metadata operations such as listing the contents of a directory don't count as file access events.



867
868
869
# File 'efs/cfn_file_system.rb', line 867

def transition_to_ia
  @transition_to_ia
end

#transition_to_primary_storage_classString? (readonly)

Whether to move files back to primary (Standard) storage after they are accessed in IA or Archive storage.

Metadata operations such as listing the contents of a directory don't count as file access events.



874
875
876
# File 'efs/cfn_file_system.rb', line 874

def transition_to_primary_storage_class
  @transition_to_primary_storage_class
end

Class Method Details

.jsii_propertiesObject



876
877
878
879
880
881
882
# File 'efs/cfn_file_system.rb', line 876

def self.jsii_properties
  {
    :transition_to_archive => "transitionToArchive",
    :transition_to_ia => "transitionToIa",
    :transition_to_primary_storage_class => "transitionToPrimaryStorageClass",
  }
end

Instance Method Details

#to_jsiiObject



884
885
886
887
888
889
890
891
892
# File 'efs/cfn_file_system.rb', line 884

def to_jsii
  result = {}
  result.merge!({
    "transitionToArchive" => @transition_to_archive,
    "transitionToIa" => @transition_to_ia,
    "transitionToPrimaryStorageClass" => @transition_to_primary_storage_class,
  })
  result.compact
end