You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::RDS::DBEngineVersion

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb

Defined Under Namespace

Classes: Collection

Associations collapse

Read-Only Attributes collapse

Instance Method Summary collapse

Constructor Details

#initialize(engine_name, version, options = {}) ⇒ DBEngineVersion #initialize(options = {}) ⇒ DBEngineVersion

Returns a new instance of DBEngineVersion

Overloads:

  • #initialize(engine_name, version, options = {}) ⇒ DBEngineVersion

    Parameters:

    • engine_name (String)
    • version (String)

    Options Hash (options):

  • #initialize(options = {}) ⇒ DBEngineVersion

    Options Hash (options):

    • :engine_name (required, String)
    • :version (required, String)
    • :client (Client)


21
22
23
24
25
26
27
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 21

def initialize(*args)
  options = Hash === args.last ? args.pop.dup : {}
  @engine_name = extract_engine_name(args, options)
  @version = extract_version(args, options)
  @data = options.delete(:data)
  @client = options.delete(:client) || Client.new(options)
end

Instance Method Details

#clientClient

Returns:



93
94
95
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 93

def client
  @client
end

#dataTypes::DBEngineVersion

Returns the data for this Aws::RDS::DBEngineVersion. Calls Client#describe_db_engine_versions if #data_loaded? is false.

Returns:



116
117
118
119
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 116

def data
  load unless @data
  @data
end

#data_loaded?Boolean

Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.

Returns:

  • (Boolean)

    Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.



124
125
126
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 124

def data_loaded?
  !!@data
end

#db_engine_descriptionString

The description of the database engine.

Returns:

  • (String)


51
52
53
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 51

def db_engine_description
  data.db_engine_description
end

#db_engine_version_descriptionString

The description of the database engine version.

Returns:

  • (String)


57
58
59
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 57

def db_engine_version_description
  data.db_engine_version_description
end

#db_parameter_group_familyString

The name of the DB parameter group family for the database engine.

Returns:

  • (String)


45
46
47
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 45

def db_parameter_group_family
  data.db_parameter_group_family
end

#default_character_setTypes::CharacterSet

The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified.

Returns:



65
66
67
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 65

def default_character_set
  data.default_character_set
end

#engine_nameString Also known as: engine

Returns:

  • (String)


32
33
34
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 32

def engine_name
  @engine_name
end

#loadself 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

Returns:

  • (self)


103
104
105
106
107
108
109
110
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 103

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

Examples:

Request syntax with placeholder values


option_group_options = db_engine_version.option_group_options({
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 152

def option_group_options(options = {})
  batches = Enumerator.new do |y|
    options = options.merge(
      engine_name: @engine,
      major_engine_version: @version
    )
    resp = @client.describe_option_group_options(options)
    resp.each_page do |page|
      batch = []
      page.data.option_group_options.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

Examples:

Request syntax with placeholder values


option_groups = db_engine_version.option_groups({
  option_group_name: "String",
  filters: [
    {
      name: "String", # required
      values: ["String"], # required
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :option_group_name (String)

    The name of the option group to describe. Cannot be supplied together with EngineName or MajorEngineVersion.

  • :filters (Array<Types::Filter>)

    This parameter is not currently supported.

Returns:



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 192

def option_groups(options = {})
  batches = Enumerator.new do |y|
    options = options.merge(
      engine_name: @engine,
      major_engine_version: @version
    )
    resp = @client.describe_option_groups(options)
    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_familyDBParameterGroupFamily?

Returns:



215
216
217
218
219
220
221
222
223
224
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 215

def parameter_group_family
  if data.db_parameter_group_family
    DBParameterGroupFamily.new(
      name: data.db_parameter_group_family,
      client: @client
    )
  else
    nil
  end
end

#supported_character_setsArray<Types::CharacterSet>

A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance action.

Returns:



72
73
74
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 72

def supported_character_sets
  data.supported_character_sets
end

#supported_timezonesArray<Types::Timezone>

A list of the time zones supported by this engine for the Timezone parameter of the CreateDBInstance action.

Returns:



86
87
88
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 86

def supported_timezones
  data.supported_timezones
end

#valid_upgrade_targetArray<Types::UpgradeTarget>

A list of engine versions that this database engine version can be upgraded to.

Returns:



79
80
81
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 79

def valid_upgrade_target
  data.valid_upgrade_target
end

#versionString Also known as: engine_version

Returns:

  • (String)


38
39
40
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/db_engine_version.rb', line 38

def version
  @version
end