Class: AWSCDK::RDS::BackupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rds/backup_props.rb

Overview

Note:

Default: - The retention period for automated backups is 1 day. The preferred backup window will be a 30-minute window selected at random from an 8-hour block of time for each AWS Region.

Backup configuration for RDS databases.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(retention:, preferred_window: nil) ⇒ BackupProps

Returns a new instance of BackupProps.

Parameters:

  • retention (AWSCDK::Duration)

    How many days to retain the backup.

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

    A daily time range in 24-hours UTC format in which backups preferably execute.



12
13
14
15
16
17
# File 'rds/backup_props.rb', line 12

def initialize(retention:, preferred_window: nil)
  @retention = retention
  Jsii::Type.check_type(@retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "retention")
  @preferred_window = preferred_window
  Jsii::Type.check_type(@preferred_window, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preferredWindow") unless @preferred_window.nil?
end

Instance Attribute Details

#preferred_windowString? (readonly)

Note:

Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow

A daily time range in 24-hours UTC format in which backups preferably execute.

Must be at least 30 minutes long.

Example: '01:00-02:00'

Returns:

  • (String, nil)


31
32
33
# File 'rds/backup_props.rb', line 31

def preferred_window
  @preferred_window
end

#retentionAWSCDK::Duration (readonly)

How many days to retain the backup.

Returns:



22
23
24
# File 'rds/backup_props.rb', line 22

def retention
  @retention
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
# File 'rds/backup_props.rb', line 33

def self.jsii_properties
  {
    :retention => "retention",
    :preferred_window => "preferredWindow",
  }
end

Instance Method Details

#to_jsiiObject



40
41
42
43
44
45
46
47
# File 'rds/backup_props.rb', line 40

def to_jsii
  result = {}
  result.merge!({
    "retention" => @retention,
    "preferredWindow" => @preferred_window,
  })
  result.compact
end