Class: AWSCDK::FSX::CfnVolume::RetentionPeriodProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
fsx/cfn_volume.rb

Overview

Specifies the retention period of an FSx for ONTAP SnapLock volume.

After it is set, it can't be changed. Files can't be deleted or modified during the retention period.

For more information, see Working with the retention period in SnapLock .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, value: nil) ⇒ RetentionPeriodProperty

Returns a new instance of RetentionPeriodProperty.

Parameters:

  • type (String)

    Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume.

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

    Defines the amount of time for the retention period of an FSx for ONTAP SnapLock volume.



1185
1186
1187
1188
1189
1190
# File 'fsx/cfn_volume.rb', line 1185

def initialize(type:, value: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") unless @value.nil?
end

Instance Attribute Details

#typeString (readonly)

Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume.

Set it to one of the valid types. If you set it to INFINITE , the files are retained forever. If you set it to UNSPECIFIED , the files are retained until you set an explicit retention period.



1198
1199
1200
# File 'fsx/cfn_volume.rb', line 1198

def type
  @type
end

#valueNumeric? (readonly)

Defines the amount of time for the retention period of an FSx for ONTAP SnapLock volume.

You can't set a value for INFINITE or UNSPECIFIED . For all other options, the following ranges are valid:

  • Seconds : 0 - 65,535
  • Minutes : 0 - 65,535
  • Hours : 0 - 24
  • Days : 0 - 365
  • Months : 0 - 12
  • Years : 0 - 100


1212
1213
1214
# File 'fsx/cfn_volume.rb', line 1212

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1214
1215
1216
1217
1218
1219
# File 'fsx/cfn_volume.rb', line 1214

def self.jsii_properties
  {
    :type => "type",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



1221
1222
1223
1224
1225
1226
1227
1228
# File 'fsx/cfn_volume.rb', line 1221

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "value" => @value,
  })
  result.compact
end