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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ec68a8d31f0e8b0f9242334acf385829dd61d62
|
4
|
+
data.tar.gz: d1872d28f16a36661d23e78c5946b95cf8060f58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9074cff70a9c5d3f1b534fc4ea21d9bec539c9085afa18e87c102fa1156e78e7bfe4f5659e4b478b61f6db23830d8cd62491e9bd9b7613ea3c797a9621b9083b
|
7
|
+
data.tar.gz: 4ad11fb21f7b12a886b651440f53b6754e749369e6dd297a9ae2c6eec360d49f100f28fb2220a6665ee68e32265153020f81a6a83091a5fe92f9a83454cabf91
|
data/lib/aws-sdk-rds.rb
CHANGED
@@ -34,13 +34,13 @@ module Aws::RDS
|
|
34
34
|
# The amount currently used toward the quota maximum.
|
35
35
|
# @return [Integer]
|
36
36
|
def used
|
37
|
-
data
|
37
|
+
data[:used]
|
38
38
|
end
|
39
39
|
|
40
40
|
# The maximum allowed value for the quota.
|
41
41
|
# @return [Integer]
|
42
42
|
def max
|
43
|
-
data
|
43
|
+
data[:max]
|
44
44
|
end
|
45
45
|
|
46
46
|
# @!endgroup
|
@@ -73,6 +73,101 @@ module Aws::RDS
|
|
73
73
|
!!@data
|
74
74
|
end
|
75
75
|
|
76
|
+
# @deprecated Use [Aws::RDS::Client] #wait_until instead
|
77
|
+
#
|
78
|
+
# Waiter polls an API operation until a resource enters a desired
|
79
|
+
# state.
|
80
|
+
#
|
81
|
+
# @note The waiting operation is performed on a copy. The original resource remains unchanged
|
82
|
+
#
|
83
|
+
# ## Basic Usage
|
84
|
+
#
|
85
|
+
# Waiter will polls until it is successful, it fails by
|
86
|
+
# entering a terminal state, or until a maximum number of attempts
|
87
|
+
# are made.
|
88
|
+
#
|
89
|
+
# # polls in a loop until condition is true
|
90
|
+
# resource.wait_until(options) {|resource| condition}
|
91
|
+
#
|
92
|
+
# ## Example
|
93
|
+
#
|
94
|
+
# instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
|
95
|
+
#
|
96
|
+
# ## Configuration
|
97
|
+
#
|
98
|
+
# You can configure the maximum number of polling attempts, and the
|
99
|
+
# delay (in seconds) between each polling attempt. The waiting condition is set
|
100
|
+
# by passing a block to {#wait_until}:
|
101
|
+
#
|
102
|
+
# # poll for ~25 seconds
|
103
|
+
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
104
|
+
#
|
105
|
+
# ## Callbacks
|
106
|
+
#
|
107
|
+
# You can be notified before each polling attempt and before each
|
108
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
109
|
+
# it will terminate the waiter.
|
110
|
+
#
|
111
|
+
# started_at = Time.now
|
112
|
+
# # poll for 1 hour, instead of a number of attempts
|
113
|
+
# proc = Proc.new do |attempts, response|
|
114
|
+
# throw :failure if Time.now - started_at > 3600
|
115
|
+
# end
|
116
|
+
#
|
117
|
+
# # disable max attempts
|
118
|
+
# instance.wait_until(before_wait:proc, max_attempts:nil) {...}
|
119
|
+
#
|
120
|
+
# ## Handling Errors
|
121
|
+
#
|
122
|
+
# When a waiter is successful, it returns the Resource. When a waiter
|
123
|
+
# fails, it raises an error.
|
124
|
+
#
|
125
|
+
# begin
|
126
|
+
# resource.wait_until(...)
|
127
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
128
|
+
# # resource did not enter the desired state in time
|
129
|
+
# end
|
130
|
+
#
|
131
|
+
#
|
132
|
+
# @yield param [Resource] resource to be used in the waiting condition
|
133
|
+
#
|
134
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
|
135
|
+
# because the waiter has entered a state that it will not transition
|
136
|
+
# out of, preventing success.
|
137
|
+
#
|
138
|
+
# yet successful.
|
139
|
+
#
|
140
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
|
141
|
+
# while polling for a resource that is not expected.
|
142
|
+
#
|
143
|
+
# @raise [NotImplementedError] Raised when the resource does not
|
144
|
+
#
|
145
|
+
# @option options [Integer] :max_attempts (10) Maximum number of
|
146
|
+
# attempts
|
147
|
+
# @option options [Integer] :delay (10) Delay between each
|
148
|
+
# attempt in seconds
|
149
|
+
# @option options [Proc] :before_attempt (nil) Callback
|
150
|
+
# invoked before each attempt
|
151
|
+
# @option options [Proc] :before_wait (nil) Callback
|
152
|
+
# invoked before each wait
|
153
|
+
# @return [Resource] if the waiter was successful
|
154
|
+
def wait_until(options = {}, &block)
|
155
|
+
self_copy = self.dup
|
156
|
+
attempts = 0
|
157
|
+
options[:max_attempts] = 10 unless options.key?(:max_attempts)
|
158
|
+
options[:delay] ||= 10
|
159
|
+
options[:poller] = Proc.new do
|
160
|
+
attempts += 1
|
161
|
+
if block.call(self_copy)
|
162
|
+
[:success, self_copy]
|
163
|
+
else
|
164
|
+
self_copy.reload unless attempts == options[:max_attempts]
|
165
|
+
:retry
|
166
|
+
end
|
167
|
+
end
|
168
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
169
|
+
end
|
170
|
+
|
76
171
|
# @deprecated
|
77
172
|
# @api private
|
78
173
|
def identifiers
|
@@ -34,31 +34,31 @@ module Aws::RDS
|
|
34
34
|
# The type of the certificate.
|
35
35
|
# @return [String]
|
36
36
|
def certificate_type
|
37
|
-
data
|
37
|
+
data[:certificate_type]
|
38
38
|
end
|
39
39
|
|
40
40
|
# The thumbprint of the certificate.
|
41
41
|
# @return [String]
|
42
42
|
def thumbprint
|
43
|
-
data
|
43
|
+
data[:thumbprint]
|
44
44
|
end
|
45
45
|
|
46
46
|
# The starting date from which the certificate is valid.
|
47
47
|
# @return [Time]
|
48
48
|
def valid_from
|
49
|
-
data
|
49
|
+
data[:valid_from]
|
50
50
|
end
|
51
51
|
|
52
52
|
# The final date that the certificate continues to be valid.
|
53
53
|
# @return [Time]
|
54
54
|
def valid_till
|
55
|
-
data
|
55
|
+
data[:valid_till]
|
56
56
|
end
|
57
57
|
|
58
58
|
# The Amazon Resource Name (ARN) for the certificate.
|
59
59
|
# @return [String]
|
60
60
|
def certificate_arn
|
61
|
-
data
|
61
|
+
data[:certificate_arn]
|
62
62
|
end
|
63
63
|
|
64
64
|
# @!endgroup
|
@@ -96,6 +96,101 @@ module Aws::RDS
|
|
96
96
|
!!@data
|
97
97
|
end
|
98
98
|
|
99
|
+
# @deprecated Use [Aws::RDS::Client] #wait_until instead
|
100
|
+
#
|
101
|
+
# Waiter polls an API operation until a resource enters a desired
|
102
|
+
# state.
|
103
|
+
#
|
104
|
+
# @note The waiting operation is performed on a copy. The original resource remains unchanged
|
105
|
+
#
|
106
|
+
# ## Basic Usage
|
107
|
+
#
|
108
|
+
# Waiter will polls until it is successful, it fails by
|
109
|
+
# entering a terminal state, or until a maximum number of attempts
|
110
|
+
# are made.
|
111
|
+
#
|
112
|
+
# # polls in a loop until condition is true
|
113
|
+
# resource.wait_until(options) {|resource| condition}
|
114
|
+
#
|
115
|
+
# ## Example
|
116
|
+
#
|
117
|
+
# instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
|
118
|
+
#
|
119
|
+
# ## Configuration
|
120
|
+
#
|
121
|
+
# You can configure the maximum number of polling attempts, and the
|
122
|
+
# delay (in seconds) between each polling attempt. The waiting condition is set
|
123
|
+
# by passing a block to {#wait_until}:
|
124
|
+
#
|
125
|
+
# # poll for ~25 seconds
|
126
|
+
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
127
|
+
#
|
128
|
+
# ## Callbacks
|
129
|
+
#
|
130
|
+
# You can be notified before each polling attempt and before each
|
131
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
132
|
+
# it will terminate the waiter.
|
133
|
+
#
|
134
|
+
# started_at = Time.now
|
135
|
+
# # poll for 1 hour, instead of a number of attempts
|
136
|
+
# proc = Proc.new do |attempts, response|
|
137
|
+
# throw :failure if Time.now - started_at > 3600
|
138
|
+
# end
|
139
|
+
#
|
140
|
+
# # disable max attempts
|
141
|
+
# instance.wait_until(before_wait:proc, max_attempts:nil) {...}
|
142
|
+
#
|
143
|
+
# ## Handling Errors
|
144
|
+
#
|
145
|
+
# When a waiter is successful, it returns the Resource. When a waiter
|
146
|
+
# fails, it raises an error.
|
147
|
+
#
|
148
|
+
# begin
|
149
|
+
# resource.wait_until(...)
|
150
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
151
|
+
# # resource did not enter the desired state in time
|
152
|
+
# end
|
153
|
+
#
|
154
|
+
#
|
155
|
+
# @yield param [Resource] resource to be used in the waiting condition
|
156
|
+
#
|
157
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
|
158
|
+
# because the waiter has entered a state that it will not transition
|
159
|
+
# out of, preventing success.
|
160
|
+
#
|
161
|
+
# yet successful.
|
162
|
+
#
|
163
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
|
164
|
+
# while polling for a resource that is not expected.
|
165
|
+
#
|
166
|
+
# @raise [NotImplementedError] Raised when the resource does not
|
167
|
+
#
|
168
|
+
# @option options [Integer] :max_attempts (10) Maximum number of
|
169
|
+
# attempts
|
170
|
+
# @option options [Integer] :delay (10) Delay between each
|
171
|
+
# attempt in seconds
|
172
|
+
# @option options [Proc] :before_attempt (nil) Callback
|
173
|
+
# invoked before each attempt
|
174
|
+
# @option options [Proc] :before_wait (nil) Callback
|
175
|
+
# invoked before each wait
|
176
|
+
# @return [Resource] if the waiter was successful
|
177
|
+
def wait_until(options = {}, &block)
|
178
|
+
self_copy = self.dup
|
179
|
+
attempts = 0
|
180
|
+
options[:max_attempts] = 10 unless options.key?(:max_attempts)
|
181
|
+
options[:delay] ||= 10
|
182
|
+
options[:poller] = Proc.new do
|
183
|
+
attempts += 1
|
184
|
+
if block.call(self_copy)
|
185
|
+
[:success, self_copy]
|
186
|
+
else
|
187
|
+
self_copy.reload unless attempts == options[:max_attempts]
|
188
|
+
:retry
|
189
|
+
end
|
190
|
+
end
|
191
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
192
|
+
end
|
193
|
+
|
99
194
|
# @deprecated
|
100
195
|
# @api private
|
101
196
|
def identifiers
|
data/lib/aws-sdk-rds/client.rb
CHANGED
@@ -12656,7 +12656,7 @@ module Aws::RDS
|
|
12656
12656
|
params: params,
|
12657
12657
|
config: config)
|
12658
12658
|
context[:gem_name] = 'aws-sdk-rds'
|
12659
|
-
context[:gem_version] = '1.
|
12659
|
+
context[:gem_version] = '1.2.0'
|
12660
12660
|
Seahorse::Client::Request.new(handlers, context)
|
12661
12661
|
end
|
12662
12662
|
|
@@ -37,28 +37,28 @@ module Aws::RDS
|
|
37
37
|
# size is not fixed, but instead automatically adjusts as needed.
|
38
38
|
# @return [Integer]
|
39
39
|
def allocated_storage
|
40
|
-
data
|
40
|
+
data[:allocated_storage]
|
41
41
|
end
|
42
42
|
|
43
43
|
# Provides the list of EC2 Availability Zones that instances in the DB
|
44
44
|
# cluster can be created in.
|
45
45
|
# @return [Array<String>]
|
46
46
|
def availability_zones
|
47
|
-
data
|
47
|
+
data[:availability_zones]
|
48
48
|
end
|
49
49
|
|
50
50
|
# Specifies the number of days for which automatic DB snapshots are
|
51
51
|
# retained.
|
52
52
|
# @return [Integer]
|
53
53
|
def backup_retention_period
|
54
|
-
data
|
54
|
+
data[:backup_retention_period]
|
55
55
|
end
|
56
56
|
|
57
57
|
# If present, specifies the name of the character set that this cluster
|
58
58
|
# is associated with.
|
59
59
|
# @return [String]
|
60
60
|
def character_set_name
|
61
|
-
data
|
61
|
+
data[:character_set_name]
|
62
62
|
end
|
63
63
|
|
64
64
|
# Contains the name of the initial database of this DB cluster that was
|
@@ -66,14 +66,14 @@ module Aws::RDS
|
|
66
66
|
# created. This same name is returned for the life of the DB cluster.
|
67
67
|
# @return [String]
|
68
68
|
def database_name
|
69
|
-
data
|
69
|
+
data[:database_name]
|
70
70
|
end
|
71
71
|
|
72
72
|
# Specifies the name of the DB cluster parameter group for the DB
|
73
73
|
# cluster.
|
74
74
|
# @return [String]
|
75
75
|
def db_cluster_parameter_group
|
76
|
-
data
|
76
|
+
data[:db_cluster_parameter_group]
|
77
77
|
end
|
78
78
|
|
79
79
|
# Specifies information on the subnet group associated with the DB
|
@@ -81,33 +81,33 @@ module Aws::RDS
|
|
81
81
|
# group.
|
82
82
|
# @return [String]
|
83
83
|
def db_subnet_group
|
84
|
-
data
|
84
|
+
data[:db_subnet_group]
|
85
85
|
end
|
86
86
|
|
87
87
|
# Specifies the current state of this DB cluster.
|
88
88
|
# @return [String]
|
89
89
|
def status
|
90
|
-
data
|
90
|
+
data[:status]
|
91
91
|
end
|
92
92
|
|
93
93
|
# Specifies the progress of the operation as a percentage.
|
94
94
|
# @return [String]
|
95
95
|
def percent_progress
|
96
|
-
data
|
96
|
+
data[:percent_progress]
|
97
97
|
end
|
98
98
|
|
99
99
|
# Specifies the earliest time to which a database can be restored with
|
100
100
|
# point-in-time restore.
|
101
101
|
# @return [Time]
|
102
102
|
def earliest_restorable_time
|
103
|
-
data
|
103
|
+
data[:earliest_restorable_time]
|
104
104
|
end
|
105
105
|
|
106
106
|
# Specifies the connection endpoint for the primary instance of the DB
|
107
107
|
# cluster.
|
108
108
|
# @return [String]
|
109
109
|
def endpoint
|
110
|
-
data
|
110
|
+
data[:endpoint]
|
111
111
|
end
|
112
112
|
|
113
113
|
# The reader endpoint for the DB cluster. The reader endpoint for a DB
|
@@ -124,52 +124,52 @@ module Aws::RDS
|
|
124
124
|
# endpoint.
|
125
125
|
# @return [String]
|
126
126
|
def reader_endpoint
|
127
|
-
data
|
127
|
+
data[:reader_endpoint]
|
128
128
|
end
|
129
129
|
|
130
130
|
# Specifies whether the DB cluster has instances in multiple
|
131
131
|
# Availability Zones.
|
132
132
|
# @return [Boolean]
|
133
133
|
def multi_az
|
134
|
-
data
|
134
|
+
data[:multi_az]
|
135
135
|
end
|
136
136
|
|
137
137
|
# Provides the name of the database engine to be used for this DB
|
138
138
|
# cluster.
|
139
139
|
# @return [String]
|
140
140
|
def engine
|
141
|
-
data
|
141
|
+
data[:engine]
|
142
142
|
end
|
143
143
|
|
144
144
|
# Indicates the database engine version.
|
145
145
|
# @return [String]
|
146
146
|
def engine_version
|
147
|
-
data
|
147
|
+
data[:engine_version]
|
148
148
|
end
|
149
149
|
|
150
150
|
# Specifies the latest time to which a database can be restored with
|
151
151
|
# point-in-time restore.
|
152
152
|
# @return [Time]
|
153
153
|
def latest_restorable_time
|
154
|
-
data
|
154
|
+
data[:latest_restorable_time]
|
155
155
|
end
|
156
156
|
|
157
157
|
# Specifies the port that the database engine is listening on.
|
158
158
|
# @return [Integer]
|
159
159
|
def port
|
160
|
-
data
|
160
|
+
data[:port]
|
161
161
|
end
|
162
162
|
|
163
163
|
# Contains the master username for the DB cluster.
|
164
164
|
# @return [String]
|
165
165
|
def master_username
|
166
|
-
data
|
166
|
+
data[:master_username]
|
167
167
|
end
|
168
168
|
|
169
169
|
# Provides the list of option group memberships for this DB cluster.
|
170
170
|
# @return [Array<Types::DBClusterOptionGroupStatus>]
|
171
171
|
def db_cluster_option_group_memberships
|
172
|
-
data
|
172
|
+
data[:db_cluster_option_group_memberships]
|
173
173
|
end
|
174
174
|
|
175
175
|
# Specifies the daily time range during which automated backups are
|
@@ -177,60 +177,60 @@ module Aws::RDS
|
|
177
177
|
# `BackupRetentionPeriod`.
|
178
178
|
# @return [String]
|
179
179
|
def preferred_backup_window
|
180
|
-
data
|
180
|
+
data[:preferred_backup_window]
|
181
181
|
end
|
182
182
|
|
183
183
|
# Specifies the weekly time range during which system maintenance can
|
184
184
|
# occur, in Universal Coordinated Time (UTC).
|
185
185
|
# @return [String]
|
186
186
|
def preferred_maintenance_window
|
187
|
-
data
|
187
|
+
data[:preferred_maintenance_window]
|
188
188
|
end
|
189
189
|
|
190
190
|
# Contains the identifier of the source DB cluster if this DB cluster is
|
191
191
|
# a Read Replica.
|
192
192
|
# @return [String]
|
193
193
|
def replication_source_identifier
|
194
|
-
data
|
194
|
+
data[:replication_source_identifier]
|
195
195
|
end
|
196
196
|
|
197
197
|
# Contains one or more identifiers of the Read Replicas associated with
|
198
198
|
# this DB cluster.
|
199
199
|
# @return [Array<String>]
|
200
200
|
def read_replica_identifiers
|
201
|
-
data
|
201
|
+
data[:read_replica_identifiers]
|
202
202
|
end
|
203
203
|
|
204
204
|
# Provides the list of instances that make up the DB cluster.
|
205
205
|
# @return [Array<Types::DBClusterMember>]
|
206
206
|
def db_cluster_members
|
207
|
-
data
|
207
|
+
data[:db_cluster_members]
|
208
208
|
end
|
209
209
|
|
210
210
|
# Provides a list of VPC security groups that the DB cluster belongs to.
|
211
211
|
# @return [Array<Types::VpcSecurityGroupMembership>]
|
212
212
|
def vpc_security_groups
|
213
|
-
data
|
213
|
+
data[:vpc_security_groups]
|
214
214
|
end
|
215
215
|
|
216
216
|
# Specifies the ID that Amazon Route 53 assigns when you create a hosted
|
217
217
|
# zone.
|
218
218
|
# @return [String]
|
219
219
|
def hosted_zone_id
|
220
|
-
data
|
220
|
+
data[:hosted_zone_id]
|
221
221
|
end
|
222
222
|
|
223
223
|
# Specifies whether the DB cluster is encrypted.
|
224
224
|
# @return [Boolean]
|
225
225
|
def storage_encrypted
|
226
|
-
data
|
226
|
+
data[:storage_encrypted]
|
227
227
|
end
|
228
228
|
|
229
229
|
# If `StorageEncrypted` is true, the KMS key identifier for the
|
230
230
|
# encrypted DB cluster.
|
231
231
|
# @return [String]
|
232
232
|
def kms_key_id
|
233
|
-
data
|
233
|
+
data[:kms_key_id]
|
234
234
|
end
|
235
235
|
|
236
236
|
# The region-unique, immutable identifier for the DB cluster. This
|
@@ -238,13 +238,13 @@ module Aws::RDS
|
|
238
238
|
# for the DB cluster is accessed.
|
239
239
|
# @return [String]
|
240
240
|
def db_cluster_resource_id
|
241
|
-
data
|
241
|
+
data[:db_cluster_resource_id]
|
242
242
|
end
|
243
243
|
|
244
244
|
# The Amazon Resource Name (ARN) for the DB cluster.
|
245
245
|
# @return [String]
|
246
246
|
def db_cluster_arn
|
247
|
-
data
|
247
|
+
data[:db_cluster_arn]
|
248
248
|
end
|
249
249
|
|
250
250
|
# Provides a list of the AWS Identity and Access Management (IAM) roles
|
@@ -253,27 +253,27 @@ module Aws::RDS
|
|
253
253
|
# AWS services on your behalf.
|
254
254
|
# @return [Array<Types::DBClusterRole>]
|
255
255
|
def associated_roles
|
256
|
-
data
|
256
|
+
data[:associated_roles]
|
257
257
|
end
|
258
258
|
|
259
259
|
# True if mapping of AWS Identity and Access Management (IAM) accounts
|
260
260
|
# to database accounts is enabled; otherwise false.
|
261
261
|
# @return [Boolean]
|
262
262
|
def iam_database_authentication_enabled
|
263
|
-
data
|
263
|
+
data[:iam_database_authentication_enabled]
|
264
264
|
end
|
265
265
|
|
266
266
|
# Identifies the clone group to which the DB cluster is associated.
|
267
267
|
# @return [String]
|
268
268
|
def clone_group_id
|
269
|
-
data
|
269
|
+
data[:clone_group_id]
|
270
270
|
end
|
271
271
|
|
272
272
|
# Specifies the time when the DB cluster was created, in Universal
|
273
273
|
# Coordinated Time (UTC).
|
274
274
|
# @return [Time]
|
275
275
|
def cluster_create_time
|
276
|
-
data
|
276
|
+
data[:cluster_create_time]
|
277
277
|
end
|
278
278
|
|
279
279
|
# @!endgroup
|
@@ -311,6 +311,101 @@ module Aws::RDS
|
|
311
311
|
!!@data
|
312
312
|
end
|
313
313
|
|
314
|
+
# @deprecated Use [Aws::RDS::Client] #wait_until instead
|
315
|
+
#
|
316
|
+
# Waiter polls an API operation until a resource enters a desired
|
317
|
+
# state.
|
318
|
+
#
|
319
|
+
# @note The waiting operation is performed on a copy. The original resource remains unchanged
|
320
|
+
#
|
321
|
+
# ## Basic Usage
|
322
|
+
#
|
323
|
+
# Waiter will polls until it is successful, it fails by
|
324
|
+
# entering a terminal state, or until a maximum number of attempts
|
325
|
+
# are made.
|
326
|
+
#
|
327
|
+
# # polls in a loop until condition is true
|
328
|
+
# resource.wait_until(options) {|resource| condition}
|
329
|
+
#
|
330
|
+
# ## Example
|
331
|
+
#
|
332
|
+
# instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
|
333
|
+
#
|
334
|
+
# ## Configuration
|
335
|
+
#
|
336
|
+
# You can configure the maximum number of polling attempts, and the
|
337
|
+
# delay (in seconds) between each polling attempt. The waiting condition is set
|
338
|
+
# by passing a block to {#wait_until}:
|
339
|
+
#
|
340
|
+
# # poll for ~25 seconds
|
341
|
+
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
342
|
+
#
|
343
|
+
# ## Callbacks
|
344
|
+
#
|
345
|
+
# You can be notified before each polling attempt and before each
|
346
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
347
|
+
# it will terminate the waiter.
|
348
|
+
#
|
349
|
+
# started_at = Time.now
|
350
|
+
# # poll for 1 hour, instead of a number of attempts
|
351
|
+
# proc = Proc.new do |attempts, response|
|
352
|
+
# throw :failure if Time.now - started_at > 3600
|
353
|
+
# end
|
354
|
+
#
|
355
|
+
# # disable max attempts
|
356
|
+
# instance.wait_until(before_wait:proc, max_attempts:nil) {...}
|
357
|
+
#
|
358
|
+
# ## Handling Errors
|
359
|
+
#
|
360
|
+
# When a waiter is successful, it returns the Resource. When a waiter
|
361
|
+
# fails, it raises an error.
|
362
|
+
#
|
363
|
+
# begin
|
364
|
+
# resource.wait_until(...)
|
365
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
366
|
+
# # resource did not enter the desired state in time
|
367
|
+
# end
|
368
|
+
#
|
369
|
+
#
|
370
|
+
# @yield param [Resource] resource to be used in the waiting condition
|
371
|
+
#
|
372
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
|
373
|
+
# because the waiter has entered a state that it will not transition
|
374
|
+
# out of, preventing success.
|
375
|
+
#
|
376
|
+
# yet successful.
|
377
|
+
#
|
378
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
|
379
|
+
# while polling for a resource that is not expected.
|
380
|
+
#
|
381
|
+
# @raise [NotImplementedError] Raised when the resource does not
|
382
|
+
#
|
383
|
+
# @option options [Integer] :max_attempts (10) Maximum number of
|
384
|
+
# attempts
|
385
|
+
# @option options [Integer] :delay (10) Delay between each
|
386
|
+
# attempt in seconds
|
387
|
+
# @option options [Proc] :before_attempt (nil) Callback
|
388
|
+
# invoked before each attempt
|
389
|
+
# @option options [Proc] :before_wait (nil) Callback
|
390
|
+
# invoked before each wait
|
391
|
+
# @return [Resource] if the waiter was successful
|
392
|
+
def wait_until(options = {}, &block)
|
393
|
+
self_copy = self.dup
|
394
|
+
attempts = 0
|
395
|
+
options[:max_attempts] = 10 unless options.key?(:max_attempts)
|
396
|
+
options[:delay] ||= 10
|
397
|
+
options[:poller] = Proc.new do
|
398
|
+
attempts += 1
|
399
|
+
if block.call(self_copy)
|
400
|
+
[:success, self_copy]
|
401
|
+
else
|
402
|
+
self_copy.reload unless attempts == options[:max_attempts]
|
403
|
+
:retry
|
404
|
+
end
|
405
|
+
end
|
406
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
407
|
+
end
|
408
|
+
|
314
409
|
# @!group Actions
|
315
410
|
|
316
411
|
# @example Request syntax with placeholder values
|
@@ -1011,9 +1106,9 @@ module Aws::RDS
|
|
1011
1106
|
# @return [DBInstance::Collection]
|
1012
1107
|
def members
|
1013
1108
|
batch = []
|
1014
|
-
data
|
1109
|
+
data[:db_cluster_members].each do |d|
|
1015
1110
|
batch << DBInstance.new(
|
1016
|
-
id: d
|
1111
|
+
id: d[:db_instance_identifier],
|
1017
1112
|
data: d,
|
1018
1113
|
client: @client
|
1019
1114
|
)
|
@@ -1024,9 +1119,9 @@ module Aws::RDS
|
|
1024
1119
|
# @return [OptionGroup::Collection]
|
1025
1120
|
def option_groups
|
1026
1121
|
batch = []
|
1027
|
-
data
|
1122
|
+
data[:db_cluster_option_group_memberships].each do |d|
|
1028
1123
|
batch << OptionGroup.new(
|
1029
|
-
name: d
|
1124
|
+
name: d[:db_cluster_option_group_name],
|
1030
1125
|
data: d,
|
1031
1126
|
client: @client
|
1032
1127
|
)
|
@@ -1036,9 +1131,9 @@ module Aws::RDS
|
|
1036
1131
|
|
1037
1132
|
# @return [DBClusterParameterGroup, nil]
|
1038
1133
|
def parameter_group
|
1039
|
-
if data
|
1134
|
+
if data[:db_cluster_parameter_group]
|
1040
1135
|
DBClusterParameterGroup.new(
|
1041
|
-
name: data
|
1136
|
+
name: data[:db_cluster_parameter_group],
|
1042
1137
|
client: @client
|
1043
1138
|
)
|
1044
1139
|
else
|
@@ -1159,9 +1254,9 @@ module Aws::RDS
|
|
1159
1254
|
|
1160
1255
|
# @return [DBSubnetGroup, nil]
|
1161
1256
|
def subnet_group
|
1162
|
-
if data
|
1257
|
+
if data[:db_subnet_group]
|
1163
1258
|
DBSubnetGroup.new(
|
1164
|
-
name: data
|
1259
|
+
name: data[:db_subnet_group],
|
1165
1260
|
client: @client
|
1166
1261
|
)
|
1167
1262
|
else
|