Class: Aws::RDS::DBEngineVersion
- Inherits:
-
Object
- Object
- Aws::RDS::DBEngineVersion
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-rds/db_engine_version.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#db_engine_description ⇒ String
The description of the database engine.
-
#db_engine_version_description ⇒ String
The description of the database engine version.
-
#db_parameter_group_family ⇒ String
The name of the DB parameter group family for the database engine.
-
#default_character_set ⇒ Types::CharacterSet
The default character set for new instances of this engine version, if the ‘CharacterSetName` parameter of the CreateDBInstance API isn’t specified.
- #engine_name ⇒ String (also: #engine)
-
#exportable_log_types ⇒ Array<String>
The types of logs that the database engine has available for export to CloudWatch Logs.
-
#status ⇒ String
The status of the DB engine version, either ‘available` or `deprecated`.
-
#supported_character_sets ⇒ Array<Types::CharacterSet>
A list of the character sets supported by this engine for the ‘CharacterSetName` parameter of the `CreateDBInstance` operation.
-
#supported_engine_modes ⇒ Array<String>
A list of the supported DB engine modes.
-
#supported_feature_names ⇒ Array<String>
A list of features supported by the DB engine.
-
#supported_nchar_character_sets ⇒ Array<Types::CharacterSet>
A list of the character sets supported by the Oracle DB engine for the ‘NcharCharacterSetName` parameter of the `CreateDBInstance` operation.
-
#supported_timezones ⇒ Array<Types::Timezone>
A list of the time zones supported by this engine for the ‘Timezone` parameter of the `CreateDBInstance` action.
-
#supports_global_databases ⇒ Boolean
A value that indicates whether you can use Aurora global databases with a specific DB engine version.
-
#supports_log_exports_to_cloudwatch_logs ⇒ Boolean
A value that indicates whether the engine version supports exporting the log types specified by ExportableLogTypes to CloudWatch Logs.
-
#supports_parallel_query ⇒ Boolean
A value that indicates whether you can use Aurora parallel query with a specific DB engine version.
-
#supports_read_replica ⇒ Boolean
Indicates whether the database engine version supports read replicas.
-
#valid_upgrade_target ⇒ Array<Types::UpgradeTarget>
A list of engine versions that this database engine version can be upgraded to.
- #version ⇒ String (also: #engine_version)
Associations collapse
- #identifiers ⇒ Object deprecated private Deprecated.
- #option_group_options(options = {}) ⇒ OptionGroupOption::Collection
- #option_groups(options = {}) ⇒ OptionGroup::Collection
- #parameter_group_family ⇒ DBParameterGroupFamily?
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::DBEngineVersion
Returns the data for this DBEngineVersion.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(*args) ⇒ DBEngineVersion
constructor
A new instance of DBEngineVersion.
-
#load ⇒ self
(also: #reload)
Loads, or reloads #data for the current DBEngineVersion.
-
#wait_until(options = {}) {|resource| ... } ⇒ Resource
deprecated
Deprecated.
Use [Aws::RDS::Client] #wait_until instead
Constructor Details
#initialize(engine_name, version, options = {}) ⇒ DBEngineVersion #initialize(options = {}) ⇒ DBEngineVersion
Returns a new instance of DBEngineVersion.
24 25 26 27 28 29 30 31 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 24 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @engine_name = extract_engine_name(args, ) @version = extract_version(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() @waiter_block_warned = false end |
Instance Method Details
#client ⇒ Client
162 163 164 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 162 def client @client end |
#data ⇒ Types::DBEngineVersion
Returns the data for this Aws::RDS::DBEngineVersion. Calls Client#describe_db_engine_versions if #data_loaded? is ‘false`.
185 186 187 188 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 185 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
193 194 195 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 193 def data_loaded? !!@data end |
#db_engine_description ⇒ String
The description of the database engine.
55 56 57 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 55 def db_engine_description data[:db_engine_description] end |
#db_engine_version_description ⇒ String
The description of the database engine version.
61 62 63 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 61 def db_engine_version_description data[:db_engine_version_description] end |
#db_parameter_group_family ⇒ String
The name of the DB parameter group family for the database engine.
49 50 51 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 49 def db_parameter_group_family data[:db_parameter_group_family] end |
#default_character_set ⇒ Types::CharacterSet
The default character set for new instances of this engine version, if the ‘CharacterSetName` parameter of the CreateDBInstance API isn’t specified.
69 70 71 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 69 def default_character_set data[:default_character_set] end |
#engine_name ⇒ String Also known as: engine
36 37 38 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 36 def engine_name @engine_name end |
#exportable_log_types ⇒ Array<String>
The types of logs that the database engine has available for export to CloudWatch Logs.
104 105 106 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 104 def exportable_log_types data[:exportable_log_types] end |
#identifiers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
394 395 396 397 398 399 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 394 def identifiers { engine_name: @engine_name, version: @version } end |
#load ⇒ self Also known as: reload
Loads, or reloads #data for the current Aws::RDS::DBEngineVersion. Returns ‘self` making it possible to chain methods.
db_engine_version.reload.data
172 173 174 175 176 177 178 179 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 172 def load resp = @client.describe_db_engine_versions( engine: @engine_name, engine_version: @version ) @data = resp.db_engine_versions[0] self end |
#option_group_options(options = {}) ⇒ OptionGroupOption::Collection
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 318 def ( = {}) batches = Enumerator.new do |y| = .merge( engine_name: @engine, major_engine_version: @version ) resp = @client.() resp.each_page do |page| batch = [] page.data..each do |o| batch << OptionGroupOption.new( name: o.name, data: o, client: @client ) end y.yield(batch) end end OptionGroupOption::Collection.new(batches) end |
#option_groups(options = {}) ⇒ OptionGroup::Collection
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 358 def option_groups( = {}) batches = Enumerator.new do |y| = .merge( engine_name: @engine, major_engine_version: @version ) resp = @client.describe_option_groups() resp.each_page do |page| batch = [] page.data.option_groups_list.each do |o| batch << OptionGroup.new( name: o.option_group_name, data: o, client: @client ) end y.yield(batch) end end OptionGroup::Collection.new(batches) end |
#parameter_group_family ⇒ DBParameterGroupFamily?
381 382 383 384 385 386 387 388 389 390 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 381 def parameter_group_family if data[:db_parameter_group_family] DBParameterGroupFamily.new( name: data[:db_parameter_group_family], client: @client ) else nil end end |
#status ⇒ String
The status of the DB engine version, either ‘available` or `deprecated`.
141 142 143 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 141 def status data[:status] end |
#supported_character_sets ⇒ Array<Types::CharacterSet>
A list of the character sets supported by this engine for the ‘CharacterSetName` parameter of the `CreateDBInstance` operation.
76 77 78 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 76 def supported_character_sets data[:supported_character_sets] end |
#supported_engine_modes ⇒ Array<String>
A list of the supported DB engine modes.
123 124 125 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 123 def supported_engine_modes data[:supported_engine_modes] end |
#supported_feature_names ⇒ Array<String>
A list of features supported by the DB engine. Supported feature names include the following.
-
s3Import
^
134 135 136 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 134 def supported_feature_names data[:supported_feature_names] end |
#supported_nchar_character_sets ⇒ Array<Types::CharacterSet>
A list of the character sets supported by the Oracle DB engine for the ‘NcharCharacterSetName` parameter of the `CreateDBInstance` operation.
83 84 85 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 83 def supported_nchar_character_sets data[:supported_nchar_character_sets] end |
#supported_timezones ⇒ Array<Types::Timezone>
A list of the time zones supported by this engine for the ‘Timezone` parameter of the `CreateDBInstance` action.
97 98 99 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 97 def supported_timezones data[:supported_timezones] end |
#supports_global_databases ⇒ Boolean
A value that indicates whether you can use Aurora global databases with a specific DB engine version.
155 156 157 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 155 def supports_global_databases data[:supports_global_databases] end |
#supports_log_exports_to_cloudwatch_logs ⇒ Boolean
A value that indicates whether the engine version supports exporting the log types specified by ExportableLogTypes to CloudWatch Logs.
111 112 113 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 111 def supports_log_exports_to_cloudwatch_logs data[:supports_log_exports_to_cloudwatch_logs] end |
#supports_parallel_query ⇒ Boolean
A value that indicates whether you can use Aurora parallel query with a specific DB engine version.
148 149 150 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 148 def supports_parallel_query data[:supports_parallel_query] end |
#supports_read_replica ⇒ Boolean
Indicates whether the database engine version supports read replicas.
117 118 119 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 117 def supports_read_replica data[:supports_read_replica] end |
#valid_upgrade_target ⇒ Array<Types::UpgradeTarget>
A list of engine versions that this database engine version can be upgraded to.
90 91 92 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 90 def valid_upgrade_target data[:valid_upgrade_target] end |
#version ⇒ String Also known as: engine_version
42 43 44 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 42 def version @version end |
#wait_until(options = {}) {|resource| ... } ⇒ Resource
Use [Aws::RDS::Client] #wait_until instead
The waiting operation is performed on a copy. The original resource remains unchanged.
Waiter polls an API operation until a resource enters a desired state.
## Basic Usage
Waiter will polls until it is successful, it fails by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop until condition is true
resource.wait_until() {|resource| condition}
## Example
instance.wait_until(max_attempts:10, delay:5) do |instance|
instance.state.name == 'running'
end
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. The waiting condition is set by passing a block to #wait_until:
# poll for ~25 seconds
resource.wait_until(max_attempts:5,delay:5) {|resource|...}
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
# poll for 1 hour, instead of a number of attempts
proc = Proc.new do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
# disable max attempts
instance.wait_until(before_wait:proc, max_attempts:nil) {...}
## Handling Errors
When a waiter is successful, it returns the Resource. When a waiter fails, it raises an error.
begin
resource.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
attempts attempt in seconds invoked before each attempt invoked before each wait
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/aws-sdk-rds/db_engine_version.rb', line 277 def wait_until( = {}, &block) self_copy = self.dup attempts = 0 [:max_attempts] = 10 unless .key?(:max_attempts) [:delay] ||= 10 [:poller] = Proc.new do attempts += 1 if block.call(self_copy) [:success, self_copy] else self_copy.reload unless attempts == [:max_attempts] :retry end end Aws::Waiters::Waiter.new().wait({}) end |