aws-sdk-rds 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-rds.rb +1 -1
- data/lib/aws-sdk-rds/account_quota.rb +97 -2
- data/lib/aws-sdk-rds/certificate.rb +100 -5
- data/lib/aws-sdk-rds/client.rb +1 -1
- data/lib/aws-sdk-rds/db_cluster.rb +137 -42
- data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +98 -3
- data/lib/aws-sdk-rds/db_cluster_snapshot.rb +113 -18
- data/lib/aws-sdk-rds/db_engine.rb +95 -0
- data/lib/aws-sdk-rds/db_engine_version.rb +104 -9
- data/lib/aws-sdk-rds/db_instance.rb +159 -64
- data/lib/aws-sdk-rds/db_log_file.rb +97 -2
- data/lib/aws-sdk-rds/db_parameter_group.rb +98 -3
- data/lib/aws-sdk-rds/db_parameter_group_family.rb +95 -0
- data/lib/aws-sdk-rds/db_security_group.rb +101 -6
- data/lib/aws-sdk-rds/db_snapshot.rb +121 -26
- data/lib/aws-sdk-rds/db_snapshot_attribute.rb +96 -1
- data/lib/aws-sdk-rds/db_subnet_group.rb +100 -5
- data/lib/aws-sdk-rds/event.rb +99 -4
- data/lib/aws-sdk-rds/event_category_map.rb +96 -1
- data/lib/aws-sdk-rds/event_subscription.rb +104 -9
- data/lib/aws-sdk-rds/option_group.rb +102 -7
- data/lib/aws-sdk-rds/option_group_option.rb +110 -15
- data/lib/aws-sdk-rds/parameter.rb +104 -9
- data/lib/aws-sdk-rds/pending_maintenance_action.rb +100 -5
- data/lib/aws-sdk-rds/reserved_db_instance.rb +111 -16
- data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +104 -9
- data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +99 -4
- metadata +2 -2
@@ -43,19 +43,19 @@ module Aws::RDS
|
|
43
43
|
# The name of the DB parameter group family for the database engine.
|
44
44
|
# @return [String]
|
45
45
|
def db_parameter_group_family
|
46
|
-
data
|
46
|
+
data[:db_parameter_group_family]
|
47
47
|
end
|
48
48
|
|
49
49
|
# The description of the database engine.
|
50
50
|
# @return [String]
|
51
51
|
def db_engine_description
|
52
|
-
data
|
52
|
+
data[:db_engine_description]
|
53
53
|
end
|
54
54
|
|
55
55
|
# The description of the database engine version.
|
56
56
|
# @return [String]
|
57
57
|
def db_engine_version_description
|
58
|
-
data
|
58
|
+
data[:db_engine_version_description]
|
59
59
|
end
|
60
60
|
|
61
61
|
# The default character set for new instances of this engine version, if
|
@@ -63,28 +63,28 @@ module Aws::RDS
|
|
63
63
|
# specified.
|
64
64
|
# @return [Types::CharacterSet]
|
65
65
|
def default_character_set
|
66
|
-
data
|
66
|
+
data[:default_character_set]
|
67
67
|
end
|
68
68
|
|
69
69
|
# A list of the character sets supported by this engine for the
|
70
70
|
# `CharacterSetName` parameter of the `CreateDBInstance` action.
|
71
71
|
# @return [Array<Types::CharacterSet>]
|
72
72
|
def supported_character_sets
|
73
|
-
data
|
73
|
+
data[:supported_character_sets]
|
74
74
|
end
|
75
75
|
|
76
76
|
# A list of engine versions that this database engine version can be
|
77
77
|
# upgraded to.
|
78
78
|
# @return [Array<Types::UpgradeTarget>]
|
79
79
|
def valid_upgrade_target
|
80
|
-
data
|
80
|
+
data[:valid_upgrade_target]
|
81
81
|
end
|
82
82
|
|
83
83
|
# A list of the time zones supported by this engine for the `Timezone`
|
84
84
|
# parameter of the `CreateDBInstance` action.
|
85
85
|
# @return [Array<Types::Timezone>]
|
86
86
|
def supported_timezones
|
87
|
-
data
|
87
|
+
data[:supported_timezones]
|
88
88
|
end
|
89
89
|
|
90
90
|
# @!endgroup
|
@@ -125,6 +125,101 @@ module Aws::RDS
|
|
125
125
|
!!@data
|
126
126
|
end
|
127
127
|
|
128
|
+
# @deprecated Use [Aws::RDS::Client] #wait_until instead
|
129
|
+
#
|
130
|
+
# Waiter polls an API operation until a resource enters a desired
|
131
|
+
# state.
|
132
|
+
#
|
133
|
+
# @note The waiting operation is performed on a copy. The original resource remains unchanged
|
134
|
+
#
|
135
|
+
# ## Basic Usage
|
136
|
+
#
|
137
|
+
# Waiter will polls until it is successful, it fails by
|
138
|
+
# entering a terminal state, or until a maximum number of attempts
|
139
|
+
# are made.
|
140
|
+
#
|
141
|
+
# # polls in a loop until condition is true
|
142
|
+
# resource.wait_until(options) {|resource| condition}
|
143
|
+
#
|
144
|
+
# ## Example
|
145
|
+
#
|
146
|
+
# instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
|
147
|
+
#
|
148
|
+
# ## Configuration
|
149
|
+
#
|
150
|
+
# You can configure the maximum number of polling attempts, and the
|
151
|
+
# delay (in seconds) between each polling attempt. The waiting condition is set
|
152
|
+
# by passing a block to {#wait_until}:
|
153
|
+
#
|
154
|
+
# # poll for ~25 seconds
|
155
|
+
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
156
|
+
#
|
157
|
+
# ## Callbacks
|
158
|
+
#
|
159
|
+
# You can be notified before each polling attempt and before each
|
160
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
161
|
+
# it will terminate the waiter.
|
162
|
+
#
|
163
|
+
# started_at = Time.now
|
164
|
+
# # poll for 1 hour, instead of a number of attempts
|
165
|
+
# proc = Proc.new do |attempts, response|
|
166
|
+
# throw :failure if Time.now - started_at > 3600
|
167
|
+
# end
|
168
|
+
#
|
169
|
+
# # disable max attempts
|
170
|
+
# instance.wait_until(before_wait:proc, max_attempts:nil) {...}
|
171
|
+
#
|
172
|
+
# ## Handling Errors
|
173
|
+
#
|
174
|
+
# When a waiter is successful, it returns the Resource. When a waiter
|
175
|
+
# fails, it raises an error.
|
176
|
+
#
|
177
|
+
# begin
|
178
|
+
# resource.wait_until(...)
|
179
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
180
|
+
# # resource did not enter the desired state in time
|
181
|
+
# end
|
182
|
+
#
|
183
|
+
#
|
184
|
+
# @yield param [Resource] resource to be used in the waiting condition
|
185
|
+
#
|
186
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
|
187
|
+
# because the waiter has entered a state that it will not transition
|
188
|
+
# out of, preventing success.
|
189
|
+
#
|
190
|
+
# yet successful.
|
191
|
+
#
|
192
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
|
193
|
+
# while polling for a resource that is not expected.
|
194
|
+
#
|
195
|
+
# @raise [NotImplementedError] Raised when the resource does not
|
196
|
+
#
|
197
|
+
# @option options [Integer] :max_attempts (10) Maximum number of
|
198
|
+
# attempts
|
199
|
+
# @option options [Integer] :delay (10) Delay between each
|
200
|
+
# attempt in seconds
|
201
|
+
# @option options [Proc] :before_attempt (nil) Callback
|
202
|
+
# invoked before each attempt
|
203
|
+
# @option options [Proc] :before_wait (nil) Callback
|
204
|
+
# invoked before each wait
|
205
|
+
# @return [Resource] if the waiter was successful
|
206
|
+
def wait_until(options = {}, &block)
|
207
|
+
self_copy = self.dup
|
208
|
+
attempts = 0
|
209
|
+
options[:max_attempts] = 10 unless options.key?(:max_attempts)
|
210
|
+
options[:delay] ||= 10
|
211
|
+
options[:poller] = Proc.new do
|
212
|
+
attempts += 1
|
213
|
+
if block.call(self_copy)
|
214
|
+
[:success, self_copy]
|
215
|
+
else
|
216
|
+
self_copy.reload unless attempts == options[:max_attempts]
|
217
|
+
:retry
|
218
|
+
end
|
219
|
+
end
|
220
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
221
|
+
end
|
222
|
+
|
128
223
|
# @!group Associations
|
129
224
|
|
130
225
|
# @return [DBEngine]
|
@@ -213,9 +308,9 @@ module Aws::RDS
|
|
213
308
|
|
214
309
|
# @return [DBParameterGroupFamily, nil]
|
215
310
|
def parameter_group_family
|
216
|
-
if data
|
311
|
+
if data[:db_parameter_group_family]
|
217
312
|
DBParameterGroupFamily.new(
|
218
|
-
name: data
|
313
|
+
name: data[:db_parameter_group_family],
|
219
314
|
client: @client
|
220
315
|
)
|
221
316
|
else
|
@@ -35,26 +35,26 @@ module Aws::RDS
|
|
35
35
|
# instance.
|
36
36
|
# @return [String]
|
37
37
|
def db_instance_class
|
38
|
-
data
|
38
|
+
data[:db_instance_class]
|
39
39
|
end
|
40
40
|
|
41
41
|
# Provides the name of the database engine to be used for this DB
|
42
42
|
# instance.
|
43
43
|
# @return [String]
|
44
44
|
def engine
|
45
|
-
data
|
45
|
+
data[:engine]
|
46
46
|
end
|
47
47
|
|
48
48
|
# Specifies the current state of this database.
|
49
49
|
# @return [String]
|
50
50
|
def db_instance_status
|
51
|
-
data
|
51
|
+
data[:db_instance_status]
|
52
52
|
end
|
53
53
|
|
54
54
|
# Contains the master username for the DB instance.
|
55
55
|
# @return [String]
|
56
56
|
def master_username
|
57
|
-
data
|
57
|
+
data[:master_username]
|
58
58
|
end
|
59
59
|
|
60
60
|
# The meaning of this parameter differs according to the database engine
|
@@ -77,25 +77,25 @@ module Aws::RDS
|
|
77
77
|
# instance.
|
78
78
|
# @return [String]
|
79
79
|
def db_name
|
80
|
-
data
|
80
|
+
data[:db_name]
|
81
81
|
end
|
82
82
|
|
83
83
|
# Specifies the connection endpoint.
|
84
84
|
# @return [Types::Endpoint]
|
85
85
|
def endpoint
|
86
|
-
data
|
86
|
+
data[:endpoint]
|
87
87
|
end
|
88
88
|
|
89
89
|
# Specifies the allocated storage size specified in gigabytes.
|
90
90
|
# @return [Integer]
|
91
91
|
def allocated_storage
|
92
|
-
data
|
92
|
+
data[:allocated_storage]
|
93
93
|
end
|
94
94
|
|
95
95
|
# Provides the date and time the DB instance was created.
|
96
96
|
# @return [Time]
|
97
97
|
def instance_create_time
|
98
|
-
data
|
98
|
+
data[:instance_create_time]
|
99
99
|
end
|
100
100
|
|
101
101
|
# Specifies the daily time range during which automated backups are
|
@@ -103,41 +103,41 @@ module Aws::RDS
|
|
103
103
|
# `BackupRetentionPeriod`.
|
104
104
|
# @return [String]
|
105
105
|
def preferred_backup_window
|
106
|
-
data
|
106
|
+
data[:preferred_backup_window]
|
107
107
|
end
|
108
108
|
|
109
109
|
# Specifies the number of days for which automatic DB snapshots are
|
110
110
|
# retained.
|
111
111
|
# @return [Integer]
|
112
112
|
def backup_retention_period
|
113
|
-
data
|
113
|
+
data[:backup_retention_period]
|
114
114
|
end
|
115
115
|
|
116
116
|
# Provides List of DB security group elements containing only
|
117
117
|
# `DBSecurityGroup.Name` and `DBSecurityGroup.Status` subelements.
|
118
118
|
# @return [Array<Types::DBSecurityGroupMembership>]
|
119
119
|
def db_security_groups
|
120
|
-
data
|
120
|
+
data[:db_security_groups]
|
121
121
|
end
|
122
122
|
|
123
123
|
# Provides a list of VPC security group elements that the DB instance
|
124
124
|
# belongs to.
|
125
125
|
# @return [Array<Types::VpcSecurityGroupMembership>]
|
126
126
|
def vpc_security_groups
|
127
|
-
data
|
127
|
+
data[:vpc_security_groups]
|
128
128
|
end
|
129
129
|
|
130
130
|
# Provides the list of DB parameter groups applied to this DB instance.
|
131
131
|
# @return [Array<Types::DBParameterGroupStatus>]
|
132
132
|
def db_parameter_groups
|
133
|
-
data
|
133
|
+
data[:db_parameter_groups]
|
134
134
|
end
|
135
135
|
|
136
136
|
# Specifies the name of the Availability Zone the DB instance is located
|
137
137
|
# in.
|
138
138
|
# @return [String]
|
139
139
|
def availability_zone
|
140
|
-
data
|
140
|
+
data[:availability_zone]
|
141
141
|
end
|
142
142
|
|
143
143
|
# Specifies information on the subnet group associated with the DB
|
@@ -145,14 +145,14 @@ module Aws::RDS
|
|
145
145
|
# group.
|
146
146
|
# @return [Types::DBSubnetGroup]
|
147
147
|
def db_subnet_group
|
148
|
-
data
|
148
|
+
data[:db_subnet_group]
|
149
149
|
end
|
150
150
|
|
151
151
|
# Specifies the weekly time range during which system maintenance can
|
152
152
|
# occur, in Universal Coordinated Time (UTC).
|
153
153
|
# @return [String]
|
154
154
|
def preferred_maintenance_window
|
155
|
-
data
|
155
|
+
data[:preferred_maintenance_window]
|
156
156
|
end
|
157
157
|
|
158
158
|
# Specifies that changes to the DB instance are pending. This element is
|
@@ -160,85 +160,85 @@ module Aws::RDS
|
|
160
160
|
# identified by subelements.
|
161
161
|
# @return [Types::PendingModifiedValues]
|
162
162
|
def pending_modified_values
|
163
|
-
data
|
163
|
+
data[:pending_modified_values]
|
164
164
|
end
|
165
165
|
|
166
166
|
# Specifies the latest time to which a database can be restored with
|
167
167
|
# point-in-time restore.
|
168
168
|
# @return [Time]
|
169
169
|
def latest_restorable_time
|
170
|
-
data
|
170
|
+
data[:latest_restorable_time]
|
171
171
|
end
|
172
172
|
|
173
173
|
# Specifies if the DB instance is a Multi-AZ deployment.
|
174
174
|
# @return [Boolean]
|
175
175
|
def multi_az
|
176
|
-
data
|
176
|
+
data[:multi_az]
|
177
177
|
end
|
178
178
|
|
179
179
|
# Indicates the database engine version.
|
180
180
|
# @return [String]
|
181
181
|
def engine_version
|
182
|
-
data
|
182
|
+
data[:engine_version]
|
183
183
|
end
|
184
184
|
|
185
185
|
# Indicates that minor version patches are applied automatically.
|
186
186
|
# @return [Boolean]
|
187
187
|
def auto_minor_version_upgrade
|
188
|
-
data
|
188
|
+
data[:auto_minor_version_upgrade]
|
189
189
|
end
|
190
190
|
|
191
191
|
# Contains the identifier of the source DB instance if this DB instance
|
192
192
|
# is a Read Replica.
|
193
193
|
# @return [String]
|
194
194
|
def read_replica_source_db_instance_identifier
|
195
|
-
data
|
195
|
+
data[:read_replica_source_db_instance_identifier]
|
196
196
|
end
|
197
197
|
|
198
198
|
# Contains one or more identifiers of the Read Replicas associated with
|
199
199
|
# this DB instance.
|
200
200
|
# @return [Array<String>]
|
201
201
|
def read_replica_db_instance_identifiers
|
202
|
-
data
|
202
|
+
data[:read_replica_db_instance_identifiers]
|
203
203
|
end
|
204
204
|
|
205
205
|
# Contains one or more identifiers of Aurora DB clusters that are Read
|
206
206
|
# Replicas of this DB instance.
|
207
207
|
# @return [Array<String>]
|
208
208
|
def read_replica_db_cluster_identifiers
|
209
|
-
data
|
209
|
+
data[:read_replica_db_cluster_identifiers]
|
210
210
|
end
|
211
211
|
|
212
212
|
# License model information for this DB instance.
|
213
213
|
# @return [String]
|
214
214
|
def license_model
|
215
|
-
data
|
215
|
+
data[:license_model]
|
216
216
|
end
|
217
217
|
|
218
218
|
# Specifies the Provisioned IOPS (I/O operations per second) value.
|
219
219
|
# @return [Integer]
|
220
220
|
def iops
|
221
|
-
data
|
221
|
+
data[:iops]
|
222
222
|
end
|
223
223
|
|
224
224
|
# Provides the list of option group memberships for this DB instance.
|
225
225
|
# @return [Array<Types::OptionGroupMembership>]
|
226
226
|
def option_group_memberships
|
227
|
-
data
|
227
|
+
data[:option_group_memberships]
|
228
228
|
end
|
229
229
|
|
230
230
|
# If present, specifies the name of the character set that this instance
|
231
231
|
# is associated with.
|
232
232
|
# @return [String]
|
233
233
|
def character_set_name
|
234
|
-
data
|
234
|
+
data[:character_set_name]
|
235
235
|
end
|
236
236
|
|
237
237
|
# If present, specifies the name of the secondary Availability Zone for
|
238
238
|
# a DB instance with multi-AZ support.
|
239
239
|
# @return [String]
|
240
240
|
def secondary_availability_zone
|
241
|
-
data
|
241
|
+
data[:secondary_availability_zone]
|
242
242
|
end
|
243
243
|
|
244
244
|
# Specifies the accessibility options for the DB instance. A value of
|
@@ -262,27 +262,27 @@ module Aws::RDS
|
|
262
262
|
# set, the DB instance will be private.
|
263
263
|
# @return [Boolean]
|
264
264
|
def publicly_accessible
|
265
|
-
data
|
265
|
+
data[:publicly_accessible]
|
266
266
|
end
|
267
267
|
|
268
268
|
# The status of a Read Replica. If the instance is not a Read Replica,
|
269
269
|
# this will be blank.
|
270
270
|
# @return [Array<Types::DBInstanceStatusInfo>]
|
271
271
|
def status_infos
|
272
|
-
data
|
272
|
+
data[:status_infos]
|
273
273
|
end
|
274
274
|
|
275
275
|
# Specifies the storage type associated with DB instance.
|
276
276
|
# @return [String]
|
277
277
|
def storage_type
|
278
|
-
data
|
278
|
+
data[:storage_type]
|
279
279
|
end
|
280
280
|
|
281
281
|
# The ARN from the key store with which the instance is associated for
|
282
282
|
# TDE encryption.
|
283
283
|
# @return [String]
|
284
284
|
def tde_credential_arn
|
285
|
-
data
|
285
|
+
data[:tde_credential_arn]
|
286
286
|
end
|
287
287
|
|
288
288
|
# Specifies the port that the DB instance listens on. If the DB instance
|
@@ -290,27 +290,27 @@ module Aws::RDS
|
|
290
290
|
# cluster port.
|
291
291
|
# @return [Integer]
|
292
292
|
def db_instance_port
|
293
|
-
data
|
293
|
+
data[:db_instance_port]
|
294
294
|
end
|
295
295
|
|
296
296
|
# If the DB instance is a member of a DB cluster, contains the name of
|
297
297
|
# the DB cluster that the DB instance is a member of.
|
298
298
|
# @return [String]
|
299
299
|
def db_cluster_identifier
|
300
|
-
data
|
300
|
+
data[:db_cluster_identifier]
|
301
301
|
end
|
302
302
|
|
303
303
|
# Specifies whether the DB instance is encrypted.
|
304
304
|
# @return [Boolean]
|
305
305
|
def storage_encrypted
|
306
|
-
data
|
306
|
+
data[:storage_encrypted]
|
307
307
|
end
|
308
308
|
|
309
309
|
# If `StorageEncrypted` is true, the KMS key identifier for the
|
310
310
|
# encrypted DB instance.
|
311
311
|
# @return [String]
|
312
312
|
def kms_key_id
|
313
|
-
data
|
313
|
+
data[:kms_key_id]
|
314
314
|
end
|
315
315
|
|
316
316
|
# The region-unique, immutable identifier for the DB instance. This
|
@@ -318,34 +318,34 @@ module Aws::RDS
|
|
318
318
|
# for the DB instance is accessed.
|
319
319
|
# @return [String]
|
320
320
|
def dbi_resource_id
|
321
|
-
data
|
321
|
+
data[:dbi_resource_id]
|
322
322
|
end
|
323
323
|
|
324
324
|
# The identifier of the CA certificate for this DB instance.
|
325
325
|
# @return [String]
|
326
326
|
def ca_certificate_identifier
|
327
|
-
data
|
327
|
+
data[:ca_certificate_identifier]
|
328
328
|
end
|
329
329
|
|
330
330
|
# The Active Directory Domain membership records associated with the DB
|
331
331
|
# instance.
|
332
332
|
# @return [Array<Types::DomainMembership>]
|
333
333
|
def domain_memberships
|
334
|
-
data
|
334
|
+
data[:domain_memberships]
|
335
335
|
end
|
336
336
|
|
337
337
|
# Specifies whether tags are copied from the DB instance to snapshots of
|
338
338
|
# the DB instance.
|
339
339
|
# @return [Boolean]
|
340
340
|
def copy_tags_to_snapshot
|
341
|
-
data
|
341
|
+
data[:copy_tags_to_snapshot]
|
342
342
|
end
|
343
343
|
|
344
344
|
# The interval, in seconds, between points when Enhanced Monitoring
|
345
345
|
# metrics are collected for the DB instance.
|
346
346
|
# @return [Integer]
|
347
347
|
def monitoring_interval
|
348
|
-
data
|
348
|
+
data[:monitoring_interval]
|
349
349
|
end
|
350
350
|
|
351
351
|
# The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log
|
@@ -353,14 +353,14 @@ module Aws::RDS
|
|
353
353
|
# instance.
|
354
354
|
# @return [String]
|
355
355
|
def enhanced_monitoring_resource_arn
|
356
|
-
data
|
356
|
+
data[:enhanced_monitoring_resource_arn]
|
357
357
|
end
|
358
358
|
|
359
359
|
# The ARN for the IAM role that permits RDS to send Enhanced Monitoring
|
360
360
|
# metrics to CloudWatch Logs.
|
361
361
|
# @return [String]
|
362
362
|
def monitoring_role_arn
|
363
|
-
data
|
363
|
+
data[:monitoring_role_arn]
|
364
364
|
end
|
365
365
|
|
366
366
|
# A value that specifies the order in which an Aurora Replica is
|
@@ -373,13 +373,13 @@ module Aws::RDS
|
|
373
373
|
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance
|
374
374
|
# @return [Integer]
|
375
375
|
def promotion_tier
|
376
|
-
data
|
376
|
+
data[:promotion_tier]
|
377
377
|
end
|
378
378
|
|
379
379
|
# The Amazon Resource Name (ARN) for the DB instance.
|
380
380
|
# @return [String]
|
381
381
|
def db_instance_arn
|
382
|
-
data
|
382
|
+
data[:db_instance_arn]
|
383
383
|
end
|
384
384
|
|
385
385
|
# The time zone of the DB instance. In most cases, the `Timezone`
|
@@ -387,7 +387,7 @@ module Aws::RDS
|
|
387
387
|
# Server DB instances that were created with a time zone specified.
|
388
388
|
# @return [String]
|
389
389
|
def timezone
|
390
|
-
data
|
390
|
+
data[:timezone]
|
391
391
|
end
|
392
392
|
|
393
393
|
# True if mapping of AWS Identity and Access Management (IAM) accounts
|
@@ -404,7 +404,7 @@ module Aws::RDS
|
|
404
404
|
# Aurora, see DBCluster Type.
|
405
405
|
# @return [Boolean]
|
406
406
|
def iam_database_authentication_enabled
|
407
|
-
data
|
407
|
+
data[:iam_database_authentication_enabled]
|
408
408
|
end
|
409
409
|
|
410
410
|
# @!endgroup
|
@@ -442,6 +442,101 @@ module Aws::RDS
|
|
442
442
|
!!@data
|
443
443
|
end
|
444
444
|
|
445
|
+
# @deprecated Use [Aws::RDS::Client] #wait_until instead
|
446
|
+
#
|
447
|
+
# Waiter polls an API operation until a resource enters a desired
|
448
|
+
# state.
|
449
|
+
#
|
450
|
+
# @note The waiting operation is performed on a copy. The original resource remains unchanged
|
451
|
+
#
|
452
|
+
# ## Basic Usage
|
453
|
+
#
|
454
|
+
# Waiter will polls until it is successful, it fails by
|
455
|
+
# entering a terminal state, or until a maximum number of attempts
|
456
|
+
# are made.
|
457
|
+
#
|
458
|
+
# # polls in a loop until condition is true
|
459
|
+
# resource.wait_until(options) {|resource| condition}
|
460
|
+
#
|
461
|
+
# ## Example
|
462
|
+
#
|
463
|
+
# instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
|
464
|
+
#
|
465
|
+
# ## Configuration
|
466
|
+
#
|
467
|
+
# You can configure the maximum number of polling attempts, and the
|
468
|
+
# delay (in seconds) between each polling attempt. The waiting condition is set
|
469
|
+
# by passing a block to {#wait_until}:
|
470
|
+
#
|
471
|
+
# # poll for ~25 seconds
|
472
|
+
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
473
|
+
#
|
474
|
+
# ## Callbacks
|
475
|
+
#
|
476
|
+
# You can be notified before each polling attempt and before each
|
477
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
478
|
+
# it will terminate the waiter.
|
479
|
+
#
|
480
|
+
# started_at = Time.now
|
481
|
+
# # poll for 1 hour, instead of a number of attempts
|
482
|
+
# proc = Proc.new do |attempts, response|
|
483
|
+
# throw :failure if Time.now - started_at > 3600
|
484
|
+
# end
|
485
|
+
#
|
486
|
+
# # disable max attempts
|
487
|
+
# instance.wait_until(before_wait:proc, max_attempts:nil) {...}
|
488
|
+
#
|
489
|
+
# ## Handling Errors
|
490
|
+
#
|
491
|
+
# When a waiter is successful, it returns the Resource. When a waiter
|
492
|
+
# fails, it raises an error.
|
493
|
+
#
|
494
|
+
# begin
|
495
|
+
# resource.wait_until(...)
|
496
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
497
|
+
# # resource did not enter the desired state in time
|
498
|
+
# end
|
499
|
+
#
|
500
|
+
#
|
501
|
+
# @yield param [Resource] resource to be used in the waiting condition
|
502
|
+
#
|
503
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
|
504
|
+
# because the waiter has entered a state that it will not transition
|
505
|
+
# out of, preventing success.
|
506
|
+
#
|
507
|
+
# yet successful.
|
508
|
+
#
|
509
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
|
510
|
+
# while polling for a resource that is not expected.
|
511
|
+
#
|
512
|
+
# @raise [NotImplementedError] Raised when the resource does not
|
513
|
+
#
|
514
|
+
# @option options [Integer] :max_attempts (10) Maximum number of
|
515
|
+
# attempts
|
516
|
+
# @option options [Integer] :delay (10) Delay between each
|
517
|
+
# attempt in seconds
|
518
|
+
# @option options [Proc] :before_attempt (nil) Callback
|
519
|
+
# invoked before each attempt
|
520
|
+
# @option options [Proc] :before_wait (nil) Callback
|
521
|
+
# invoked before each wait
|
522
|
+
# @return [Resource] if the waiter was successful
|
523
|
+
def wait_until(options = {}, &block)
|
524
|
+
self_copy = self.dup
|
525
|
+
attempts = 0
|
526
|
+
options[:max_attempts] = 10 unless options.key?(:max_attempts)
|
527
|
+
options[:delay] ||= 10
|
528
|
+
options[:poller] = Proc.new do
|
529
|
+
attempts += 1
|
530
|
+
if block.call(self_copy)
|
531
|
+
[:success, self_copy]
|
532
|
+
else
|
533
|
+
self_copy.reload unless attempts == options[:max_attempts]
|
534
|
+
:retry
|
535
|
+
end
|
536
|
+
end
|
537
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
538
|
+
end
|
539
|
+
|
445
540
|
# @!group Actions
|
446
541
|
|
447
542
|
# @example Request syntax with placeholder values
|
@@ -2532,9 +2627,9 @@ module Aws::RDS
|
|
2532
2627
|
|
2533
2628
|
# @return [Certificate, nil]
|
2534
2629
|
def certificate
|
2535
|
-
if data
|
2630
|
+
if data[:ca_certificate_identifier]
|
2536
2631
|
Certificate.new(
|
2537
|
-
id: data
|
2632
|
+
id: data[:ca_certificate_identifier],
|
2538
2633
|
client: @client
|
2539
2634
|
)
|
2540
2635
|
else
|
@@ -2544,9 +2639,9 @@ module Aws::RDS
|
|
2544
2639
|
|
2545
2640
|
# @return [DBCluster, nil]
|
2546
2641
|
def cluster
|
2547
|
-
if data
|
2642
|
+
if data[:db_cluster_identifier]
|
2548
2643
|
DBCluster.new(
|
2549
|
-
id: data
|
2644
|
+
id: data[:db_cluster_identifier],
|
2550
2645
|
client: @client
|
2551
2646
|
)
|
2552
2647
|
else
|
@@ -2671,9 +2766,9 @@ module Aws::RDS
|
|
2671
2766
|
# @return [OptionGroup::Collection]
|
2672
2767
|
def option_groups
|
2673
2768
|
batch = []
|
2674
|
-
data
|
2769
|
+
data[:option_group_memberships].each do |d|
|
2675
2770
|
batch << OptionGroup.new(
|
2676
|
-
name:
|
2771
|
+
name: d[:option_group_name],
|
2677
2772
|
client: @client
|
2678
2773
|
)
|
2679
2774
|
end
|
@@ -2683,9 +2778,9 @@ module Aws::RDS
|
|
2683
2778
|
# @return [DBParameterGroup::Collection]
|
2684
2779
|
def parameter_groups
|
2685
2780
|
batch = []
|
2686
|
-
data
|
2781
|
+
data[:db_parameter_groups].each do |d|
|
2687
2782
|
batch << DBParameterGroup.new(
|
2688
|
-
name: d
|
2783
|
+
name: d[:db_parameter_group_name],
|
2689
2784
|
client: @client
|
2690
2785
|
)
|
2691
2786
|
end
|
@@ -2761,9 +2856,9 @@ module Aws::RDS
|
|
2761
2856
|
# @return [DBInstance::Collection]
|
2762
2857
|
def read_replicas
|
2763
2858
|
batch = []
|
2764
|
-
data
|
2859
|
+
data[:read_replica_db_instance_identifiers].each do |d|
|
2765
2860
|
batch << DBInstance.new(
|
2766
|
-
id:
|
2861
|
+
id: d,
|
2767
2862
|
client: @client
|
2768
2863
|
)
|
2769
2864
|
end
|
@@ -2773,9 +2868,9 @@ module Aws::RDS
|
|
2773
2868
|
# @return [DBSecurityGroup::Collection]
|
2774
2869
|
def security_groups
|
2775
2870
|
batch = []
|
2776
|
-
data
|
2871
|
+
data[:db_security_groups].each do |d|
|
2777
2872
|
batch << DBSecurityGroup.new(
|
2778
|
-
name: d
|
2873
|
+
name: d[:db_security_group_name],
|
2779
2874
|
client: @client
|
2780
2875
|
)
|
2781
2876
|
end
|
@@ -2880,9 +2975,9 @@ module Aws::RDS
|
|
2880
2975
|
|
2881
2976
|
# @return [DBInstance, nil]
|
2882
2977
|
def source
|
2883
|
-
if data
|
2978
|
+
if data[:read_replica_source_db_instance_identifier]
|
2884
2979
|
DBInstance.new(
|
2885
|
-
id: data
|
2980
|
+
id: data[:read_replica_source_db_instance_identifier],
|
2886
2981
|
client: @client
|
2887
2982
|
)
|
2888
2983
|
else
|
@@ -2892,9 +2987,9 @@ module Aws::RDS
|
|
2892
2987
|
|
2893
2988
|
# @return [DBSubnetGroup, nil]
|
2894
2989
|
def subnet_group
|
2895
|
-
if data
|
2990
|
+
if data[:db_subnet_group][:db_subnet_group_name]
|
2896
2991
|
DBSubnetGroup.new(
|
2897
|
-
name: data
|
2992
|
+
name: data[:db_subnet_group][:db_subnet_group_name],
|
2898
2993
|
client: @client
|
2899
2994
|
)
|
2900
2995
|
else
|