aws-sdk-rds 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/lib/aws-sdk-rds.rb +73 -0
  3. data/lib/aws-sdk-rds/account_quota.rb +100 -0
  4. data/lib/aws-sdk-rds/certificate.rb +123 -0
  5. data/lib/aws-sdk-rds/client.rb +9214 -0
  6. data/lib/aws-sdk-rds/client_api.rb +3027 -0
  7. data/lib/aws-sdk-rds/customizations.rb +7 -0
  8. data/lib/aws-sdk-rds/db_cluster.rb +1074 -0
  9. data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +230 -0
  10. data/lib/aws-sdk-rds/db_cluster_snapshot.rb +478 -0
  11. data/lib/aws-sdk-rds/db_engine.rb +241 -0
  12. data/lib/aws-sdk-rds/db_engine_version.rb +263 -0
  13. data/lib/aws-sdk-rds/db_instance.rb +2680 -0
  14. data/lib/aws-sdk-rds/db_log_file.rb +170 -0
  15. data/lib/aws-sdk-rds/db_parameter_group.rb +455 -0
  16. data/lib/aws-sdk-rds/db_parameter_group_family.rb +167 -0
  17. data/lib/aws-sdk-rds/db_security_group.rb +358 -0
  18. data/lib/aws-sdk-rds/db_snapshot.rb +714 -0
  19. data/lib/aws-sdk-rds/db_snapshot_attribute.rb +160 -0
  20. data/lib/aws-sdk-rds/db_subnet_group.rb +188 -0
  21. data/lib/aws-sdk-rds/errors.rb +23 -0
  22. data/lib/aws-sdk-rds/event.rb +134 -0
  23. data/lib/aws-sdk-rds/event_category_map.rb +98 -0
  24. data/lib/aws-sdk-rds/event_subscription.rb +352 -0
  25. data/lib/aws-sdk-rds/option_group.rb +283 -0
  26. data/lib/aws-sdk-rds/option_group_option.rb +166 -0
  27. data/lib/aws-sdk-rds/parameter.rb +144 -0
  28. data/lib/aws-sdk-rds/pending_maintenance_action.rb +211 -0
  29. data/lib/aws-sdk-rds/reserved_db_instance.rb +191 -0
  30. data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +183 -0
  31. data/lib/aws-sdk-rds/resource.rb +2384 -0
  32. data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +111 -0
  33. data/lib/aws-sdk-rds/types.rb +10965 -0
  34. data/lib/aws-sdk-rds/waiters.rb +149 -0
  35. metadata +106 -0
@@ -0,0 +1,241 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module RDS
10
+ class DBEngine
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(name, options = {})
15
+ # @param [String] name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :name
19
+ # @option options [Client] :client
20
+ def initialize(*args)
21
+ options = Hash === args.last ? args.pop.dup : {}
22
+ @name = extract_name(args, options)
23
+ @data = Aws::EmptyStructure.new
24
+ @client = options.delete(:client) || Client.new(options)
25
+ end
26
+
27
+ # @!group Read-Only Attributes
28
+
29
+ # @return [String]
30
+ def name
31
+ @name
32
+ end
33
+
34
+ # @!endgroup
35
+
36
+ # @return [Client]
37
+ def client
38
+ @client
39
+ end
40
+
41
+ # @raise [Errors::ResourceNotLoadable]
42
+ # @api private
43
+ def load
44
+ msg = "#load is not implemented, data only available via enumeration"
45
+ raise Errors::ResourceNotLoadable, msg
46
+ end
47
+ alias :reload :load
48
+
49
+ # @api private
50
+ # @return [EmptyStructure]
51
+ def data
52
+ @data
53
+ end
54
+
55
+ # @return [Boolean]
56
+ # Returns `true` if this resource is loaded. Accessing attributes or
57
+ # {#data} on an unloaded resource will trigger a call to {#load}.
58
+ def data_loaded?
59
+ !!@data
60
+ end
61
+
62
+ # @!group Associations
63
+
64
+ # @example Request syntax with placeholder values
65
+ #
66
+ # optiongroupoptions = db_engine.option_group_options({
67
+ # major_engine_version: "String",
68
+ # filters: [
69
+ # {
70
+ # name: "String", # required
71
+ # values: ["String"], # required
72
+ # },
73
+ # ],
74
+ # })
75
+ # @param [Hash] options ({})
76
+ # @option options [String] :major_engine_version
77
+ # If specified, filters the results to include only options for the
78
+ # specified major engine version.
79
+ # @option options [Array<Types::Filter>] :filters
80
+ # This parameter is not currently supported.
81
+ # @return [OptionGroupOption::Collection]
82
+ def option_group_options(options = {})
83
+ batches = Enumerator.new do |y|
84
+ options = options.merge(engine_name: @name)
85
+ resp = @client.describe_option_group_options(options)
86
+ resp.each_page do |page|
87
+ batch = []
88
+ page.data.option_group_options.each do |o|
89
+ batch << OptionGroupOption.new(
90
+ name: o.name,
91
+ data: o,
92
+ client: @client
93
+ )
94
+ end
95
+ y.yield(batch)
96
+ end
97
+ end
98
+ OptionGroupOption::Collection.new(batches)
99
+ end
100
+
101
+ # @example Request syntax with placeholder values
102
+ #
103
+ # optiongroups = db_engine.option_groups({
104
+ # option_group_name: "String",
105
+ # filters: [
106
+ # {
107
+ # name: "String", # required
108
+ # values: ["String"], # required
109
+ # },
110
+ # ],
111
+ # major_engine_version: "String",
112
+ # })
113
+ # @param [Hash] options ({})
114
+ # @option options [String] :option_group_name
115
+ # The name of the option group to describe. Cannot be supplied together
116
+ # with EngineName or MajorEngineVersion.
117
+ # @option options [Array<Types::Filter>] :filters
118
+ # This parameter is not currently supported.
119
+ # @option options [String] :major_engine_version
120
+ # Filters the list of option groups to only include groups associated
121
+ # with a specific database engine version. If specified, then EngineName
122
+ # must also be specified.
123
+ # @return [OptionGroup::Collection]
124
+ def option_groups(options = {})
125
+ batches = Enumerator.new do |y|
126
+ options = options.merge(engine_name: @name)
127
+ resp = @client.describe_option_groups(options)
128
+ resp.each_page do |page|
129
+ batch = []
130
+ page.data.option_groups_list.each do |o|
131
+ batch << OptionGroup.new(
132
+ name: o.option_group_name,
133
+ data: o,
134
+ client: @client
135
+ )
136
+ end
137
+ y.yield(batch)
138
+ end
139
+ end
140
+ OptionGroup::Collection.new(batches)
141
+ end
142
+
143
+ # @param [String] version
144
+ # @return [DBEngineVersion]
145
+ def version(version)
146
+ DBEngineVersion.new(
147
+ engine_name: @name,
148
+ version: version,
149
+ client: @client
150
+ )
151
+ end
152
+
153
+ # @example Request syntax with placeholder values
154
+ #
155
+ # versions = db_engine.versions({
156
+ # engine_version: "String",
157
+ # db_parameter_group_family: "String",
158
+ # filters: [
159
+ # {
160
+ # name: "String", # required
161
+ # values: ["String"], # required
162
+ # },
163
+ # ],
164
+ # default_only: false,
165
+ # list_supported_character_sets: false,
166
+ # list_supported_timezones: false,
167
+ # })
168
+ # @param [Hash] options ({})
169
+ # @option options [String] :engine_version
170
+ # The database engine version to return.
171
+ #
172
+ # Example: `5.1.49`
173
+ # @option options [String] :db_parameter_group_family
174
+ # The name of a specific DB parameter group family to return details
175
+ # for.
176
+ #
177
+ # Constraints:
178
+ #
179
+ # * Must be 1 to 255 alphanumeric characters
180
+ #
181
+ # * First character must be a letter
182
+ #
183
+ # * Cannot end with a hyphen or contain two consecutive hyphens
184
+ # @option options [Array<Types::Filter>] :filters
185
+ # Not currently supported.
186
+ # @option options [Boolean] :default_only
187
+ # Indicates that only the default version of the specified engine or
188
+ # engine and major version combination is returned.
189
+ # @option options [Boolean] :list_supported_character_sets
190
+ # If this parameter is specified and the requested engine supports the
191
+ # `CharacterSetName` parameter for `CreateDBInstance`, the response
192
+ # includes a list of supported character sets for each engine version.
193
+ # @option options [Boolean] :list_supported_timezones
194
+ # If this parameter is specified and the requested engine supports the
195
+ # `TimeZone` parameter for `CreateDBInstance`, the response includes a
196
+ # list of supported time zones for each engine version.
197
+ # @return [DBEngineVersion::Collection]
198
+ def versions(options = {})
199
+ batches = Enumerator.new do |y|
200
+ options = options.merge(engine: @name)
201
+ resp = @client.describe_db_engine_versions(options)
202
+ resp.each_page do |page|
203
+ batch = []
204
+ page.data.db_engine_versions.each do |d|
205
+ batch << DBEngineVersion.new(
206
+ engine_name: @name,
207
+ version: d.engine_version,
208
+ data: d,
209
+ client: @client
210
+ )
211
+ end
212
+ y.yield(batch)
213
+ end
214
+ end
215
+ DBEngineVersion::Collection.new(batches)
216
+ end
217
+
218
+ # @deprecated
219
+ # @api private
220
+ def identifiers
221
+ { name: @name }
222
+ end
223
+ deprecated(:identifiers)
224
+
225
+ private
226
+
227
+ def extract_name(args, options)
228
+ value = args[0] || options.delete(:name)
229
+ case value
230
+ when String then value
231
+ when nil then raise ArgumentError, "missing required option :name"
232
+ else
233
+ msg = "expected :name to be a String, got #{value.class}"
234
+ raise ArgumentError, msg
235
+ end
236
+ end
237
+
238
+ class Collection < Aws::Resources::Collection; end
239
+ end
240
+ end
241
+ end
@@ -0,0 +1,263 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module RDS
10
+ class DBEngineVersion
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(engine_name, version, options = {})
15
+ # @param [String] engine_name
16
+ # @param [String] version
17
+ # @option options [Client] :client
18
+ # @overload def initialize(options = {})
19
+ # @option options [required, String] :engine_name
20
+ # @option options [required, String] :version
21
+ # @option options [Client] :client
22
+ def initialize(*args)
23
+ options = Hash === args.last ? args.pop.dup : {}
24
+ @engine_name = extract_engine_name(args, options)
25
+ @version = extract_version(args, options)
26
+ @data = options.delete(:data)
27
+ @client = options.delete(:client) || Client.new(options)
28
+ end
29
+
30
+ # @!group Read-Only Attributes
31
+
32
+ # @return [String]
33
+ def engine_name
34
+ @engine_name
35
+ end
36
+
37
+ # @return [String]
38
+ def version
39
+ @version
40
+ end
41
+ alias :engine_version :version
42
+
43
+ # The name of the DB parameter group family for the database engine.
44
+ # @return [String]
45
+ def db_parameter_group_family
46
+ data.db_parameter_group_family
47
+ end
48
+
49
+ # The description of the database engine.
50
+ # @return [String]
51
+ def db_engine_description
52
+ data.db_engine_description
53
+ end
54
+
55
+ # The description of the database engine version.
56
+ # @return [String]
57
+ def db_engine_version_description
58
+ data.db_engine_version_description
59
+ end
60
+
61
+ # The default character set for new instances of this engine version, if
62
+ # the `CharacterSetName` parameter of the CreateDBInstance API is not
63
+ # specified.
64
+ # @return [Types::CharacterSet]
65
+ def default_character_set
66
+ data.default_character_set
67
+ end
68
+
69
+ # A list of the character sets supported by this engine for the
70
+ # `CharacterSetName` parameter of the `CreateDBInstance` action.
71
+ # @return [Array<Types::CharacterSet>]
72
+ def supported_character_sets
73
+ data.supported_character_sets
74
+ end
75
+
76
+ # A list of engine versions that this database engine version can be
77
+ # upgraded to.
78
+ # @return [Array<Types::UpgradeTarget>]
79
+ def valid_upgrade_target
80
+ data.valid_upgrade_target
81
+ end
82
+
83
+ # A list of the time zones supported by this engine for the `Timezone`
84
+ # parameter of the `CreateDBInstance` action.
85
+ # @return [Array<Types::Timezone>]
86
+ def supported_timezones
87
+ data.supported_timezones
88
+ end
89
+
90
+ # @!endgroup
91
+
92
+ # @return [Client]
93
+ def client
94
+ @client
95
+ end
96
+
97
+ # Loads, or reloads {#data} for the current {DBEngineVersion}.
98
+ # Returns `self` making it possible to chain methods.
99
+ #
100
+ # db_engine_version.reload.data
101
+ #
102
+ # @return [self]
103
+ def load
104
+ resp = @client.describe_db_engine_versions(
105
+ engine: @engine_name,
106
+ engine_version: @version
107
+ )
108
+ @data = resp.dbengineversions[0]
109
+ self
110
+ end
111
+ alias :reload :load
112
+
113
+ # @return [Types::DBEngineVersion]
114
+ # Returns the data for this {DBEngineVersion}. Calls
115
+ # {Client#describe_db_engine_versions} if {#data_loaded?} is `false`.
116
+ def data
117
+ load unless @data
118
+ @data
119
+ end
120
+
121
+ # @return [Boolean]
122
+ # Returns `true` if this resource is loaded. Accessing attributes or
123
+ # {#data} on an unloaded resource will trigger a call to {#load}.
124
+ def data_loaded?
125
+ !!@data
126
+ end
127
+
128
+ # @!group Associations
129
+
130
+ # @return [DBEngine]
131
+ def engine
132
+ DBEngine.new(
133
+ name: @engine,
134
+ client: @client
135
+ )
136
+ end
137
+
138
+ # @example Request syntax with placeholder values
139
+ #
140
+ # optiongroupoptions = db_engine_version.option_group_options({
141
+ # filters: [
142
+ # {
143
+ # name: "String", # required
144
+ # values: ["String"], # required
145
+ # },
146
+ # ],
147
+ # })
148
+ # @param [Hash] options ({})
149
+ # @option options [Array<Types::Filter>] :filters
150
+ # This parameter is not currently supported.
151
+ # @return [OptionGroupOption::Collection]
152
+ def option_group_options(options = {})
153
+ batches = Enumerator.new do |y|
154
+ options = options.merge(
155
+ engine_name: @engine,
156
+ major_engine_version: @version
157
+ )
158
+ resp = @client.describe_option_group_options(options)
159
+ resp.each_page do |page|
160
+ batch = []
161
+ page.data.option_group_options.each do |o|
162
+ batch << OptionGroupOption.new(
163
+ name: o.name,
164
+ data: o,
165
+ client: @client
166
+ )
167
+ end
168
+ y.yield(batch)
169
+ end
170
+ end
171
+ OptionGroupOption::Collection.new(batches)
172
+ end
173
+
174
+ # @example Request syntax with placeholder values
175
+ #
176
+ # optiongroups = db_engine_version.option_groups({
177
+ # option_group_name: "String",
178
+ # filters: [
179
+ # {
180
+ # name: "String", # required
181
+ # values: ["String"], # required
182
+ # },
183
+ # ],
184
+ # })
185
+ # @param [Hash] options ({})
186
+ # @option options [String] :option_group_name
187
+ # The name of the option group to describe. Cannot be supplied together
188
+ # with EngineName or MajorEngineVersion.
189
+ # @option options [Array<Types::Filter>] :filters
190
+ # This parameter is not currently supported.
191
+ # @return [OptionGroup::Collection]
192
+ def option_groups(options = {})
193
+ batches = Enumerator.new do |y|
194
+ options = options.merge(
195
+ engine_name: @engine,
196
+ major_engine_version: @version
197
+ )
198
+ resp = @client.describe_option_groups(options)
199
+ resp.each_page do |page|
200
+ batch = []
201
+ page.data.option_groups_list.each do |o|
202
+ batch << OptionGroup.new(
203
+ name: o.option_group_name,
204
+ data: o,
205
+ client: @client
206
+ )
207
+ end
208
+ y.yield(batch)
209
+ end
210
+ end
211
+ OptionGroup::Collection.new(batches)
212
+ end
213
+
214
+ # @return [DBParameterGroupFamily, nil]
215
+ def parameter_group_family
216
+ if data.db_parameter_group_family
217
+ DBParameterGroupFamily.new(
218
+ name: data.db_parameter_group_family,
219
+ client: @client
220
+ )
221
+ else
222
+ nil
223
+ end
224
+ end
225
+
226
+ # @deprecated
227
+ # @api private
228
+ def identifiers
229
+ {
230
+ engine_name: @engine_name,
231
+ version: @version
232
+ }
233
+ end
234
+ deprecated(:identifiers)
235
+
236
+ private
237
+
238
+ def extract_engine_name(args, options)
239
+ value = args[0] || options.delete(:engine_name)
240
+ case value
241
+ when String then value
242
+ when nil then raise ArgumentError, "missing required option :engine_name"
243
+ else
244
+ msg = "expected :engine_name to be a String, got #{value.class}"
245
+ raise ArgumentError, msg
246
+ end
247
+ end
248
+
249
+ def extract_version(args, options)
250
+ value = args[1] || options.delete(:version)
251
+ case value
252
+ when String then value
253
+ when nil then raise ArgumentError, "missing required option :version"
254
+ else
255
+ msg = "expected :version to be a String, got #{value.class}"
256
+ raise ArgumentError, msg
257
+ end
258
+ end
259
+
260
+ class Collection < Aws::Resources::Collection; end
261
+ end
262
+ end
263
+ end