aws-sdk-rds 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-rds.rb +73 -0
- data/lib/aws-sdk-rds/account_quota.rb +100 -0
- data/lib/aws-sdk-rds/certificate.rb +123 -0
- data/lib/aws-sdk-rds/client.rb +9214 -0
- data/lib/aws-sdk-rds/client_api.rb +3027 -0
- data/lib/aws-sdk-rds/customizations.rb +7 -0
- data/lib/aws-sdk-rds/db_cluster.rb +1074 -0
- data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +230 -0
- data/lib/aws-sdk-rds/db_cluster_snapshot.rb +478 -0
- data/lib/aws-sdk-rds/db_engine.rb +241 -0
- data/lib/aws-sdk-rds/db_engine_version.rb +263 -0
- data/lib/aws-sdk-rds/db_instance.rb +2680 -0
- data/lib/aws-sdk-rds/db_log_file.rb +170 -0
- data/lib/aws-sdk-rds/db_parameter_group.rb +455 -0
- data/lib/aws-sdk-rds/db_parameter_group_family.rb +167 -0
- data/lib/aws-sdk-rds/db_security_group.rb +358 -0
- data/lib/aws-sdk-rds/db_snapshot.rb +714 -0
- data/lib/aws-sdk-rds/db_snapshot_attribute.rb +160 -0
- data/lib/aws-sdk-rds/db_subnet_group.rb +188 -0
- data/lib/aws-sdk-rds/errors.rb +23 -0
- data/lib/aws-sdk-rds/event.rb +134 -0
- data/lib/aws-sdk-rds/event_category_map.rb +98 -0
- data/lib/aws-sdk-rds/event_subscription.rb +352 -0
- data/lib/aws-sdk-rds/option_group.rb +283 -0
- data/lib/aws-sdk-rds/option_group_option.rb +166 -0
- data/lib/aws-sdk-rds/parameter.rb +144 -0
- data/lib/aws-sdk-rds/pending_maintenance_action.rb +211 -0
- data/lib/aws-sdk-rds/reserved_db_instance.rb +191 -0
- data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +183 -0
- data/lib/aws-sdk-rds/resource.rb +2384 -0
- data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +111 -0
- data/lib/aws-sdk-rds/types.rb +10965 -0
- data/lib/aws-sdk-rds/waiters.rb +149 -0
- metadata +106 -0
@@ -0,0 +1,98 @@
|
|
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 EventCategoryMap
|
11
|
+
|
12
|
+
extend Aws::Deprecations
|
13
|
+
|
14
|
+
# @overload def initialize(source_type, options = {})
|
15
|
+
# @param [String] source_type
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :source_type
|
19
|
+
# @option options [Client] :client
|
20
|
+
def initialize(*args)
|
21
|
+
options = Hash === args.last ? args.pop.dup : {}
|
22
|
+
@source_type = extract_source_type(args, options)
|
23
|
+
@data = options.delete(:data)
|
24
|
+
@client = options.delete(:client) || Client.new(options)
|
25
|
+
end
|
26
|
+
|
27
|
+
# @!group Read-Only Attributes
|
28
|
+
|
29
|
+
# @return [String]
|
30
|
+
def source_type
|
31
|
+
@source_type
|
32
|
+
end
|
33
|
+
|
34
|
+
# The event categories for the specified source type
|
35
|
+
# @return [Array<String>]
|
36
|
+
def event_categories
|
37
|
+
data.event_categories
|
38
|
+
end
|
39
|
+
|
40
|
+
# @!endgroup
|
41
|
+
|
42
|
+
# @return [Client]
|
43
|
+
def client
|
44
|
+
@client
|
45
|
+
end
|
46
|
+
|
47
|
+
# Loads, or reloads {#data} for the current {EventCategoryMap}.
|
48
|
+
# Returns `self` making it possible to chain methods.
|
49
|
+
#
|
50
|
+
# event_category_map.reload.data
|
51
|
+
#
|
52
|
+
# @return [self]
|
53
|
+
def load
|
54
|
+
resp = @client.describe_event_categories(source_type: @name)
|
55
|
+
@data = resp.eventcategoriesmaplist[0]
|
56
|
+
self
|
57
|
+
end
|
58
|
+
alias :reload :load
|
59
|
+
|
60
|
+
# @return [Types::EventCategoriesMap]
|
61
|
+
# Returns the data for this {EventCategoryMap}. Calls
|
62
|
+
# {Client#describe_event_categories} if {#data_loaded?} is `false`.
|
63
|
+
def data
|
64
|
+
load unless @data
|
65
|
+
@data
|
66
|
+
end
|
67
|
+
|
68
|
+
# @return [Boolean]
|
69
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
70
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
71
|
+
def data_loaded?
|
72
|
+
!!@data
|
73
|
+
end
|
74
|
+
|
75
|
+
# @deprecated
|
76
|
+
# @api private
|
77
|
+
def identifiers
|
78
|
+
{ source_type: @source_type }
|
79
|
+
end
|
80
|
+
deprecated(:identifiers)
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def extract_source_type(args, options)
|
85
|
+
value = args[0] || options.delete(:source_type)
|
86
|
+
case value
|
87
|
+
when String then value
|
88
|
+
when nil then raise ArgumentError, "missing required option :source_type"
|
89
|
+
else
|
90
|
+
msg = "expected :source_type to be a String, got #{value.class}"
|
91
|
+
raise ArgumentError, msg
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
class Collection < Aws::Resources::Collection; end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,352 @@
|
|
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 EventSubscription
|
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 = options.delete(:data)
|
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
|
+
alias :cust_subscription_id :name
|
34
|
+
|
35
|
+
# The AWS customer account associated with the RDS event notification
|
36
|
+
# subscription.
|
37
|
+
# @return [String]
|
38
|
+
def customer_aws_id
|
39
|
+
data.customer_aws_id
|
40
|
+
end
|
41
|
+
|
42
|
+
# The topic ARN of the RDS event notification subscription.
|
43
|
+
# @return [String]
|
44
|
+
def sns_topic_arn
|
45
|
+
data.sns_topic_arn
|
46
|
+
end
|
47
|
+
|
48
|
+
# The status of the RDS event notification subscription.
|
49
|
+
#
|
50
|
+
# Constraints:
|
51
|
+
#
|
52
|
+
# Can be one of the following: creating \| modifying \| deleting \|
|
53
|
+
# active \| no-permission \| topic-not-exist
|
54
|
+
#
|
55
|
+
# The status "no-permission" indicates that RDS no longer has
|
56
|
+
# permission to post to the SNS topic. The status "topic-not-exist"
|
57
|
+
# indicates that the topic was deleted after the subscription was
|
58
|
+
# created.
|
59
|
+
# @return [String]
|
60
|
+
def status
|
61
|
+
data.status
|
62
|
+
end
|
63
|
+
|
64
|
+
# The time the RDS event notification subscription was created.
|
65
|
+
# @return [String]
|
66
|
+
def subscription_creation_time
|
67
|
+
data.subscription_creation_time
|
68
|
+
end
|
69
|
+
|
70
|
+
# The source type for the RDS event notification subscription.
|
71
|
+
# @return [String]
|
72
|
+
def source_type
|
73
|
+
data.source_type
|
74
|
+
end
|
75
|
+
|
76
|
+
# A list of source IDs for the RDS event notification subscription.
|
77
|
+
# @return [Array<String>]
|
78
|
+
def source_ids_list
|
79
|
+
data.source_ids_list
|
80
|
+
end
|
81
|
+
|
82
|
+
# A list of event categories for the RDS event notification
|
83
|
+
# subscription.
|
84
|
+
# @return [Array<String>]
|
85
|
+
def event_categories_list
|
86
|
+
data.event_categories_list
|
87
|
+
end
|
88
|
+
|
89
|
+
# A Boolean value indicating if the subscription is enabled. True
|
90
|
+
# indicates the subscription is enabled.
|
91
|
+
# @return [Boolean]
|
92
|
+
def enabled
|
93
|
+
data.enabled
|
94
|
+
end
|
95
|
+
|
96
|
+
# The Amazon Resource Name (ARN) for the event subscription.
|
97
|
+
# @return [String]
|
98
|
+
def event_subscription_arn
|
99
|
+
data.event_subscription_arn
|
100
|
+
end
|
101
|
+
|
102
|
+
# @!endgroup
|
103
|
+
|
104
|
+
# @return [Client]
|
105
|
+
def client
|
106
|
+
@client
|
107
|
+
end
|
108
|
+
|
109
|
+
# Loads, or reloads {#data} for the current {EventSubscription}.
|
110
|
+
# Returns `self` making it possible to chain methods.
|
111
|
+
#
|
112
|
+
# event_subscription.reload.data
|
113
|
+
#
|
114
|
+
# @return [self]
|
115
|
+
def load
|
116
|
+
resp = @client.describe_event_subscriptions(subscription_name: @name)
|
117
|
+
@data = resp.eventsubscriptionslist[0]
|
118
|
+
self
|
119
|
+
end
|
120
|
+
alias :reload :load
|
121
|
+
|
122
|
+
# @return [Types::EventSubscription]
|
123
|
+
# Returns the data for this {EventSubscription}. Calls
|
124
|
+
# {Client#describe_event_subscriptions} if {#data_loaded?} is `false`.
|
125
|
+
def data
|
126
|
+
load unless @data
|
127
|
+
@data
|
128
|
+
end
|
129
|
+
|
130
|
+
# @return [Boolean]
|
131
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
132
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
133
|
+
def data_loaded?
|
134
|
+
!!@data
|
135
|
+
end
|
136
|
+
|
137
|
+
# @!group Actions
|
138
|
+
|
139
|
+
# @example Request syntax with placeholder values
|
140
|
+
#
|
141
|
+
# eventsubscription = event_subscription.add_subscriber({
|
142
|
+
# source_identifier: "String", # required
|
143
|
+
# })
|
144
|
+
# @param [Hash] options ({})
|
145
|
+
# @option options [required, String] :source_identifier
|
146
|
+
# The identifier of the event source to be added. An identifier must
|
147
|
+
# begin with a letter and must contain only ASCII letters, digits, and
|
148
|
+
# hyphens; it cannot end with a hyphen or contain two consecutive
|
149
|
+
# hyphens.
|
150
|
+
#
|
151
|
+
# Constraints:
|
152
|
+
#
|
153
|
+
# * If the source type is a DB instance, then a `DBInstanceIdentifier`
|
154
|
+
# must be supplied.
|
155
|
+
#
|
156
|
+
# * If the source type is a DB security group, a `DBSecurityGroupName`
|
157
|
+
# must be supplied.
|
158
|
+
#
|
159
|
+
# * If the source type is a DB parameter group, a `DBParameterGroupName`
|
160
|
+
# must be supplied.
|
161
|
+
#
|
162
|
+
# * If the source type is a DB snapshot, a `DBSnapshotIdentifier` must
|
163
|
+
# be supplied.
|
164
|
+
# @return [EventSubscription]
|
165
|
+
def add_subscriber(options = {})
|
166
|
+
options = options.merge(subscription_name: @name)
|
167
|
+
resp = @client.add_source_identifier_to_subscription(options)
|
168
|
+
EventSubscription.new(
|
169
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
170
|
+
data: resp.data.event_subscription,
|
171
|
+
client: @client
|
172
|
+
)
|
173
|
+
end
|
174
|
+
|
175
|
+
# @example Request syntax with placeholder values
|
176
|
+
#
|
177
|
+
# eventsubscription = event_subscription.create({
|
178
|
+
# sns_topic_arn: "String", # required
|
179
|
+
# source_type: "String",
|
180
|
+
# event_categories: ["String"],
|
181
|
+
# source_ids: ["String"],
|
182
|
+
# enabled: false,
|
183
|
+
# tags: [
|
184
|
+
# {
|
185
|
+
# key: "String",
|
186
|
+
# value: "String",
|
187
|
+
# },
|
188
|
+
# ],
|
189
|
+
# })
|
190
|
+
# @param [Hash] options ({})
|
191
|
+
# @option options [required, String] :sns_topic_arn
|
192
|
+
# The Amazon Resource Name (ARN) of the SNS topic created for event
|
193
|
+
# notification. The ARN is created by Amazon SNS when you create a topic
|
194
|
+
# and subscribe to it.
|
195
|
+
# @option options [String] :source_type
|
196
|
+
# The type of source that will be generating the events. For example, if
|
197
|
+
# you want to be notified of events generated by a DB instance, you
|
198
|
+
# would set this parameter to db-instance. if this value is not
|
199
|
+
# specified, all events are returned.
|
200
|
+
#
|
201
|
+
# Valid values: `db-instance` \| `db-cluster` \| `db-parameter-group` \|
|
202
|
+
# `db-security-group` \| `db-snapshot` \| `db-cluster-snapshot`
|
203
|
+
# @option options [Array<String>] :event_categories
|
204
|
+
# A list of event categories for a SourceType that you want to subscribe
|
205
|
+
# to. You can see a list of the categories for a given SourceType in the
|
206
|
+
# [Events][1] topic in the Amazon RDS User Guide or by using the
|
207
|
+
# **DescribeEventCategories** action.
|
208
|
+
#
|
209
|
+
#
|
210
|
+
#
|
211
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html
|
212
|
+
# @option options [Array<String>] :source_ids
|
213
|
+
# The list of identifiers of the event sources for which events will be
|
214
|
+
# returned. If not specified, then all sources are included in the
|
215
|
+
# response. An identifier must begin with a letter and must contain only
|
216
|
+
# ASCII letters, digits, and hyphens; it cannot end with a hyphen or
|
217
|
+
# contain two consecutive hyphens.
|
218
|
+
#
|
219
|
+
# Constraints:
|
220
|
+
#
|
221
|
+
# * If SourceIds are supplied, SourceType must also be provided.
|
222
|
+
#
|
223
|
+
# * If the source type is a DB instance, then a `DBInstanceIdentifier`
|
224
|
+
# must be supplied.
|
225
|
+
#
|
226
|
+
# * If the source type is a DB security group, a `DBSecurityGroupName`
|
227
|
+
# must be supplied.
|
228
|
+
#
|
229
|
+
# * If the source type is a DB parameter group, a `DBParameterGroupName`
|
230
|
+
# must be supplied.
|
231
|
+
#
|
232
|
+
# * If the source type is a DB snapshot, a `DBSnapshotIdentifier` must
|
233
|
+
# be supplied.
|
234
|
+
# @option options [Boolean] :enabled
|
235
|
+
# A Boolean value; set to **true** to activate the subscription, set to
|
236
|
+
# **false** to create the subscription but not active it.
|
237
|
+
# @option options [Array<Types::Tag>] :tags
|
238
|
+
# A list of tags.
|
239
|
+
# @return [EventSubscription]
|
240
|
+
def create(options = {})
|
241
|
+
options = options.merge(subscription_name: @name)
|
242
|
+
resp = @client.create_event_subscription(options)
|
243
|
+
EventSubscription.new(
|
244
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
245
|
+
data: resp.data.event_subscription,
|
246
|
+
client: @client
|
247
|
+
)
|
248
|
+
end
|
249
|
+
|
250
|
+
# @example Request syntax with placeholder values
|
251
|
+
#
|
252
|
+
# eventsubscription = event_subscription.delete()
|
253
|
+
# @param [Hash] options ({})
|
254
|
+
# @return [EventSubscription]
|
255
|
+
def delete(options = {})
|
256
|
+
options = options.merge(subscription_name: @name)
|
257
|
+
resp = @client.delete_event_subscription(options)
|
258
|
+
EventSubscription.new(
|
259
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
260
|
+
data: resp.data.event_subscription,
|
261
|
+
client: @client
|
262
|
+
)
|
263
|
+
end
|
264
|
+
|
265
|
+
# @example Request syntax with placeholder values
|
266
|
+
#
|
267
|
+
# eventsubscription = event_subscription.modify({
|
268
|
+
# sns_topic_arn: "String",
|
269
|
+
# source_type: "String",
|
270
|
+
# event_categories: ["String"],
|
271
|
+
# enabled: false,
|
272
|
+
# })
|
273
|
+
# @param [Hash] options ({})
|
274
|
+
# @option options [String] :sns_topic_arn
|
275
|
+
# The Amazon Resource Name (ARN) of the SNS topic created for event
|
276
|
+
# notification. The ARN is created by Amazon SNS when you create a topic
|
277
|
+
# and subscribe to it.
|
278
|
+
# @option options [String] :source_type
|
279
|
+
# The type of source that will be generating the events. For example, if
|
280
|
+
# you want to be notified of events generated by a DB instance, you
|
281
|
+
# would set this parameter to db-instance. if this value is not
|
282
|
+
# specified, all events are returned.
|
283
|
+
#
|
284
|
+
# Valid values: db-instance \| db-parameter-group \| db-security-group
|
285
|
+
# \| db-snapshot
|
286
|
+
# @option options [Array<String>] :event_categories
|
287
|
+
# A list of event categories for a SourceType that you want to subscribe
|
288
|
+
# to. You can see a list of the categories for a given SourceType in the
|
289
|
+
# [Events][1] topic in the Amazon RDS User Guide or by using the
|
290
|
+
# **DescribeEventCategories** action.
|
291
|
+
#
|
292
|
+
#
|
293
|
+
#
|
294
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html
|
295
|
+
# @option options [Boolean] :enabled
|
296
|
+
# A Boolean value; set to **true** to activate the subscription.
|
297
|
+
# @return [EventSubscription]
|
298
|
+
def modify(options = {})
|
299
|
+
options = options.merge(subscription_name: @name)
|
300
|
+
resp = @client.modify_event_subscription(options)
|
301
|
+
EventSubscription.new(
|
302
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
303
|
+
data: resp.data.event_subscription,
|
304
|
+
client: @client
|
305
|
+
)
|
306
|
+
end
|
307
|
+
|
308
|
+
# @example Request syntax with placeholder values
|
309
|
+
#
|
310
|
+
# eventsubscription = event_subscription.remove_subscriber({
|
311
|
+
# source_identifier: "String", # required
|
312
|
+
# })
|
313
|
+
# @param [Hash] options ({})
|
314
|
+
# @option options [required, String] :source_identifier
|
315
|
+
# The source identifier to be removed from the subscription, such as the
|
316
|
+
# **DB instance identifier** for a DB instance or the name of a security
|
317
|
+
# group.
|
318
|
+
# @return [EventSubscription]
|
319
|
+
def remove_subscriber(options = {})
|
320
|
+
options = options.merge(subscription_name: @name)
|
321
|
+
resp = @client.remove_source_identifier_from_subscription(options)
|
322
|
+
EventSubscription.new(
|
323
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
324
|
+
data: resp.data.event_subscription,
|
325
|
+
client: @client
|
326
|
+
)
|
327
|
+
end
|
328
|
+
|
329
|
+
# @deprecated
|
330
|
+
# @api private
|
331
|
+
def identifiers
|
332
|
+
{ name: @name }
|
333
|
+
end
|
334
|
+
deprecated(:identifiers)
|
335
|
+
|
336
|
+
private
|
337
|
+
|
338
|
+
def extract_name(args, options)
|
339
|
+
value = args[0] || options.delete(:name)
|
340
|
+
case value
|
341
|
+
when String then value
|
342
|
+
when nil then raise ArgumentError, "missing required option :name"
|
343
|
+
else
|
344
|
+
msg = "expected :name to be a String, got #{value.class}"
|
345
|
+
raise ArgumentError, msg
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
class Collection < Aws::Resources::Collection; end
|
350
|
+
end
|
351
|
+
end
|
352
|
+
end
|
@@ -0,0 +1,283 @@
|
|
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 OptionGroup
|
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 = options.delete(:data)
|
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
|
+
alias :option_group_name :name
|
34
|
+
|
35
|
+
# Provides a description of the option group.
|
36
|
+
# @return [String]
|
37
|
+
def option_group_description
|
38
|
+
data.option_group_description
|
39
|
+
end
|
40
|
+
|
41
|
+
# Indicates the name of the engine that this option group can be applied
|
42
|
+
# to.
|
43
|
+
# @return [String]
|
44
|
+
def engine_name
|
45
|
+
data.engine_name
|
46
|
+
end
|
47
|
+
|
48
|
+
# Indicates the major engine version associated with this option group.
|
49
|
+
# @return [String]
|
50
|
+
def major_engine_version
|
51
|
+
data.major_engine_version
|
52
|
+
end
|
53
|
+
|
54
|
+
# Indicates what options are available in the option group.
|
55
|
+
# @return [Array<Types::Option>]
|
56
|
+
def options
|
57
|
+
data.options
|
58
|
+
end
|
59
|
+
|
60
|
+
# Indicates whether this option group can be applied to both VPC and
|
61
|
+
# non-VPC instances. The value `true` indicates the option group can be
|
62
|
+
# applied to both VPC and non-VPC instances.
|
63
|
+
# @return [Boolean]
|
64
|
+
def allows_vpc_and_non_vpc_instance_memberships
|
65
|
+
data.allows_vpc_and_non_vpc_instance_memberships
|
66
|
+
end
|
67
|
+
|
68
|
+
# If **AllowsVpcAndNonVpcInstanceMemberships** is `false`, this field is
|
69
|
+
# blank. If **AllowsVpcAndNonVpcInstanceMemberships** is `true` and this
|
70
|
+
# field is blank, then this option group can be applied to both VPC and
|
71
|
+
# non-VPC instances. If this field contains a value, then this option
|
72
|
+
# group can only be applied to instances that are in the VPC indicated
|
73
|
+
# by this field.
|
74
|
+
# @return [String]
|
75
|
+
def vpc_id
|
76
|
+
data.vpc_id
|
77
|
+
end
|
78
|
+
|
79
|
+
# The Amazon Resource Name (ARN) for the option group.
|
80
|
+
# @return [String]
|
81
|
+
def option_group_arn
|
82
|
+
data.option_group_arn
|
83
|
+
end
|
84
|
+
|
85
|
+
# @!endgroup
|
86
|
+
|
87
|
+
# @return [Client]
|
88
|
+
def client
|
89
|
+
@client
|
90
|
+
end
|
91
|
+
|
92
|
+
# Loads, or reloads {#data} for the current {OptionGroup}.
|
93
|
+
# Returns `self` making it possible to chain methods.
|
94
|
+
#
|
95
|
+
# option_group.reload.data
|
96
|
+
#
|
97
|
+
# @return [self]
|
98
|
+
def load
|
99
|
+
resp = @client.describe_option_groups(option_group_name: @name)
|
100
|
+
@data = resp.optiongroupslist[0]
|
101
|
+
self
|
102
|
+
end
|
103
|
+
alias :reload :load
|
104
|
+
|
105
|
+
# @return [Types::OptionGroup]
|
106
|
+
# Returns the data for this {OptionGroup}. Calls
|
107
|
+
# {Client#describe_option_groups} if {#data_loaded?} is `false`.
|
108
|
+
def data
|
109
|
+
load unless @data
|
110
|
+
@data
|
111
|
+
end
|
112
|
+
|
113
|
+
# @return [Boolean]
|
114
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
115
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
116
|
+
def data_loaded?
|
117
|
+
!!@data
|
118
|
+
end
|
119
|
+
|
120
|
+
# @!group Actions
|
121
|
+
|
122
|
+
# @example Request syntax with placeholder values
|
123
|
+
#
|
124
|
+
# optiongroup = option_group.create({
|
125
|
+
# engine_name: "String", # required
|
126
|
+
# major_engine_version: "String", # required
|
127
|
+
# option_group_description: "String", # required
|
128
|
+
# tags: [
|
129
|
+
# {
|
130
|
+
# key: "String",
|
131
|
+
# value: "String",
|
132
|
+
# },
|
133
|
+
# ],
|
134
|
+
# })
|
135
|
+
# @param [Hash] options ({})
|
136
|
+
# @option options [required, String] :engine_name
|
137
|
+
# Specifies the name of the engine that this option group should be
|
138
|
+
# associated with.
|
139
|
+
# @option options [required, String] :major_engine_version
|
140
|
+
# Specifies the major version of the engine that this option group
|
141
|
+
# should be associated with.
|
142
|
+
# @option options [required, String] :option_group_description
|
143
|
+
# The description of the option group.
|
144
|
+
# @option options [Array<Types::Tag>] :tags
|
145
|
+
# A list of tags.
|
146
|
+
# @return [OptionGroup]
|
147
|
+
def create(options = {})
|
148
|
+
options = options.merge(option_group_name: @name)
|
149
|
+
resp = @client.create_option_group(options)
|
150
|
+
OptionGroup.new(
|
151
|
+
name: resp.data.option_group.option_group_name,
|
152
|
+
data: resp.data.option_group,
|
153
|
+
client: @client
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
# @example Request syntax with placeholder values
|
158
|
+
#
|
159
|
+
# optiongroup = option_group.copy({
|
160
|
+
# target_option_group_identifier: "String", # required
|
161
|
+
# target_option_group_description: "String", # required
|
162
|
+
# tags: [
|
163
|
+
# {
|
164
|
+
# key: "String",
|
165
|
+
# value: "String",
|
166
|
+
# },
|
167
|
+
# ],
|
168
|
+
# })
|
169
|
+
# @param [Hash] options ({})
|
170
|
+
# @option options [required, String] :target_option_group_identifier
|
171
|
+
# The identifier for the copied option group.
|
172
|
+
#
|
173
|
+
# Constraints:
|
174
|
+
#
|
175
|
+
# * Cannot be null, empty, or blank
|
176
|
+
#
|
177
|
+
# * Must contain from 1 to 255 alphanumeric characters or hyphens
|
178
|
+
#
|
179
|
+
# * First character must be a letter
|
180
|
+
#
|
181
|
+
# * Cannot end with a hyphen or contain two consecutive hyphens
|
182
|
+
#
|
183
|
+
# Example: `my-option-group`
|
184
|
+
# @option options [required, String] :target_option_group_description
|
185
|
+
# The description for the copied option group.
|
186
|
+
# @option options [Array<Types::Tag>] :tags
|
187
|
+
# A list of tags.
|
188
|
+
# @return [OptionGroup]
|
189
|
+
def copy(options = {})
|
190
|
+
options = options.merge(source_option_group_identifier: @name)
|
191
|
+
resp = @client.copy_option_group(options)
|
192
|
+
OptionGroup.new(
|
193
|
+
name: resp.data.option_group.option_group_name,
|
194
|
+
data: resp.data.option_group,
|
195
|
+
client: @client
|
196
|
+
)
|
197
|
+
end
|
198
|
+
|
199
|
+
# @example Request syntax with placeholder values
|
200
|
+
#
|
201
|
+
# option_group.delete()
|
202
|
+
# @param [Hash] options ({})
|
203
|
+
# @return [EmptyStructure]
|
204
|
+
def delete(options = {})
|
205
|
+
options = options.merge(option_group_name: @name)
|
206
|
+
resp = @client.delete_option_group(options)
|
207
|
+
resp.data
|
208
|
+
end
|
209
|
+
|
210
|
+
# @example Request syntax with placeholder values
|
211
|
+
#
|
212
|
+
# optiongroup = option_group.modify({
|
213
|
+
# options_to_include: [
|
214
|
+
# {
|
215
|
+
# option_name: "String", # required
|
216
|
+
# port: 1,
|
217
|
+
# option_version: "String",
|
218
|
+
# db_security_group_memberships: ["String"],
|
219
|
+
# vpc_security_group_memberships: ["String"],
|
220
|
+
# option_settings: [
|
221
|
+
# {
|
222
|
+
# name: "String",
|
223
|
+
# value: "String",
|
224
|
+
# default_value: "String",
|
225
|
+
# description: "String",
|
226
|
+
# apply_type: "String",
|
227
|
+
# data_type: "String",
|
228
|
+
# allowed_values: "String",
|
229
|
+
# is_modifiable: false,
|
230
|
+
# is_collection: false,
|
231
|
+
# },
|
232
|
+
# ],
|
233
|
+
# },
|
234
|
+
# ],
|
235
|
+
# options_to_remove: ["String"],
|
236
|
+
# apply_immediately: false,
|
237
|
+
# })
|
238
|
+
# @param [Hash] options ({})
|
239
|
+
# @option options [Array<Types::OptionConfiguration>] :options_to_include
|
240
|
+
# Options in this list are added to the option group or, if already
|
241
|
+
# present, the specified configuration is used to update the existing
|
242
|
+
# configuration.
|
243
|
+
# @option options [Array<String>] :options_to_remove
|
244
|
+
# Options in this list are removed from the option group.
|
245
|
+
# @option options [Boolean] :apply_immediately
|
246
|
+
# Indicates whether the changes should be applied immediately, or during
|
247
|
+
# the next maintenance window for each instance associated with the
|
248
|
+
# option group.
|
249
|
+
# @return [OptionGroup]
|
250
|
+
def modify(options = {})
|
251
|
+
options = options.merge(option_group_name: @name)
|
252
|
+
resp = @client.modify_option_group(options)
|
253
|
+
OptionGroup.new(
|
254
|
+
name: resp.data.option_group.option_group_name,
|
255
|
+
data: resp.data.option_group,
|
256
|
+
client: @client
|
257
|
+
)
|
258
|
+
end
|
259
|
+
|
260
|
+
# @deprecated
|
261
|
+
# @api private
|
262
|
+
def identifiers
|
263
|
+
{ name: @name }
|
264
|
+
end
|
265
|
+
deprecated(:identifiers)
|
266
|
+
|
267
|
+
private
|
268
|
+
|
269
|
+
def extract_name(args, options)
|
270
|
+
value = args[0] || options.delete(:name)
|
271
|
+
case value
|
272
|
+
when String then value
|
273
|
+
when nil then raise ArgumentError, "missing required option :name"
|
274
|
+
else
|
275
|
+
msg = "expected :name to be a String, got #{value.class}"
|
276
|
+
raise ArgumentError, msg
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
class Collection < Aws::Resources::Collection; end
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|