Class: Google::Apis::RedisV1::PersistenceConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/redis_v1/classes.rb,
lib/google/apis/redis_v1/representations.rb,
lib/google/apis/redis_v1/representations.rb

Overview

Configuration of the persistence functionality.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PersistenceConfig

Returns a new instance of PersistenceConfig.



2149
2150
2151
# File 'lib/google/apis/redis_v1/classes.rb', line 2149

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#persistence_modeString

Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. Corresponds to the JSON property persistenceMode

Returns:

  • (String)


2125
2126
2127
# File 'lib/google/apis/redis_v1/classes.rb', line 2125

def persistence_mode
  @persistence_mode
end

#rdb_next_snapshot_timeString

Output only. The next time that a snapshot attempt is scheduled to occur. Corresponds to the JSON property rdbNextSnapshotTime

Returns:

  • (String)


2130
2131
2132
# File 'lib/google/apis/redis_v1/classes.rb', line 2130

def rdb_next_snapshot_time
  @rdb_next_snapshot_time
end

#rdb_snapshot_periodString

Optional. Period between RDB snapshots. Snapshots will be attempted every period starting from the provided snapshot start time. For example, a start time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, 18:45, and 00:45 the next day, and so on. If not provided, TWENTY_FOUR_HOURS will be used as default. Corresponds to the JSON property rdbSnapshotPeriod

Returns:

  • (String)


2140
2141
2142
# File 'lib/google/apis/redis_v1/classes.rb', line 2140

def rdb_snapshot_period
  @rdb_snapshot_period
end

#rdb_snapshot_start_timeString

Optional. Date and time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used. Corresponds to the JSON property rdbSnapshotStartTime

Returns:

  • (String)


2147
2148
2149
# File 'lib/google/apis/redis_v1/classes.rb', line 2147

def rdb_snapshot_start_time
  @rdb_snapshot_start_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2154
2155
2156
2157
2158
2159
# File 'lib/google/apis/redis_v1/classes.rb', line 2154

def update!(**args)
  @persistence_mode = args[:persistence_mode] if args.key?(:persistence_mode)
  @rdb_next_snapshot_time = args[:rdb_next_snapshot_time] if args.key?(:rdb_next_snapshot_time)
  @rdb_snapshot_period = args[:rdb_snapshot_period] if args.key?(:rdb_snapshot_period)
  @rdb_snapshot_start_time = args[:rdb_snapshot_start_time] if args.key?(:rdb_snapshot_start_time)
end