Class: AWSCDK::RDS::BackupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RDS::BackupProps
- Defined in:
- rds/backup_props.rb
Overview
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
-
#preferred_window ⇒ String?
readonly
A daily time range in 24-hours UTC format in which backups preferably execute.
-
#retention ⇒ AWSCDK::Duration
readonly
How many days to retain the backup.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(retention:, preferred_window: nil) ⇒ BackupProps
constructor
A new instance of BackupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(retention:, preferred_window: nil) ⇒ BackupProps
Returns a new instance of BackupProps.
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_window ⇒ String? (readonly)
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'
31 32 33 |
# File 'rds/backup_props.rb', line 31 def preferred_window @preferred_window end |
#retention ⇒ AWSCDK::Duration (readonly)
How many days to retain the backup.
22 23 24 |
# File 'rds/backup_props.rb', line 22 def retention @retention end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |