Class: AWSCDK::DynamoDB::PointInTimeRecoverySpecification

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
dynamo_db/point_in_time_recovery_specification.rb

Overview

Reference to PointInTimeRecovey Specification for continuous backups.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(point_in_time_recovery_enabled:, recovery_period_in_days: nil) ⇒ PointInTimeRecoverySpecification

Returns a new instance of PointInTimeRecoverySpecification.

Parameters:

  • point_in_time_recovery_enabled (Boolean)

    Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.

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

    The number of preceding days for which continuous backups are taken and maintained.



9
10
11
12
13
14
# File 'dynamo_db/point_in_time_recovery_specification.rb', line 9

def initialize(point_in_time_recovery_enabled:, recovery_period_in_days: nil)
  @point_in_time_recovery_enabled = point_in_time_recovery_enabled
  Jsii::Type.check_type(@point_in_time_recovery_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "pointInTimeRecoveryEnabled")
  @recovery_period_in_days = recovery_period_in_days
  Jsii::Type.check_type(@recovery_period_in_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "recoveryPeriodInDays") unless @recovery_period_in_days.nil?
end

Instance Attribute Details

#point_in_time_recovery_enabledBoolean (readonly)

Note:

Default: false

Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.

Returns:

  • (Boolean)


20
21
22
# File 'dynamo_db/point_in_time_recovery_specification.rb', line 20

def point_in_time_recovery_enabled
  @point_in_time_recovery_enabled
end

#recovery_period_in_daysNumeric? (readonly)

Note:

Default: 35

The number of preceding days for which continuous backups are taken and maintained.

Your table data is only recoverable to any point-in-time from within the configured recovery period. If no value is provided, the value will default to 35.

Returns:

  • (Numeric, nil)


28
29
30
# File 'dynamo_db/point_in_time_recovery_specification.rb', line 28

def recovery_period_in_days
  @recovery_period_in_days
end

Class Method Details

.jsii_propertiesObject



30
31
32
33
34
35
# File 'dynamo_db/point_in_time_recovery_specification.rb', line 30

def self.jsii_properties
  {
    :point_in_time_recovery_enabled => "pointInTimeRecoveryEnabled",
    :recovery_period_in_days => "recoveryPeriodInDays",
  }
end

Instance Method Details

#to_jsiiObject



37
38
39
40
41
42
43
44
# File 'dynamo_db/point_in_time_recovery_specification.rb', line 37

def to_jsii
  result = {}
  result.merge!({
    "pointInTimeRecoveryEnabled" => @point_in_time_recovery_enabled,
    "recoveryPeriodInDays" => @recovery_period_in_days,
  })
  result.compact
end