aws-sdk-rds 1.0.0.rc2 → 1.0.0.rc3
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 +2 -2
- data/lib/aws-sdk-rds/account_quota.rb +79 -81
- data/lib/aws-sdk-rds/certificate.rb +99 -101
- data/lib/aws-sdk-rds/client.rb +10575 -9119
- data/lib/aws-sdk-rds/client_api.rb +3049 -3023
- data/lib/aws-sdk-rds/db_cluster.rb +1005 -1007
- data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +204 -206
- data/lib/aws-sdk-rds/db_cluster_snapshot.rb +430 -432
- data/lib/aws-sdk-rds/db_engine.rb +208 -210
- data/lib/aws-sdk-rds/db_engine_version.rb +218 -219
- data/lib/aws-sdk-rds/db_instance.rb +2747 -2567
- data/lib/aws-sdk-rds/db_log_file.rb +145 -147
- data/lib/aws-sdk-rds/db_parameter_group.rb +411 -413
- data/lib/aws-sdk-rds/db_parameter_group_family.rb +135 -137
- data/lib/aws-sdk-rds/db_security_group.rb +316 -318
- data/lib/aws-sdk-rds/db_snapshot.rb +705 -650
- data/lib/aws-sdk-rds/db_snapshot_attribute.rb +137 -139
- data/lib/aws-sdk-rds/db_subnet_group.rb +161 -163
- data/lib/aws-sdk-rds/errors.rb +4 -13
- data/lib/aws-sdk-rds/event.rb +108 -110
- data/lib/aws-sdk-rds/event_category_map.rb +73 -75
- data/lib/aws-sdk-rds/event_subscription.rb +313 -315
- data/lib/aws-sdk-rds/option_group.rb +247 -249
- data/lib/aws-sdk-rds/option_group_option.rb +135 -137
- data/lib/aws-sdk-rds/parameter.rb +116 -118
- data/lib/aws-sdk-rds/pending_maintenance_action.rb +182 -184
- data/lib/aws-sdk-rds/plugins/cross_region_copying.rb +64 -0
- data/lib/aws-sdk-rds/reserved_db_instance.rb +156 -158
- data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +154 -156
- data/lib/aws-sdk-rds/resource.rb +2395 -2288
- data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +89 -91
- data/lib/aws-sdk-rds/types.rb +12091 -10977
- data/lib/aws-sdk-rds/waiters.rb +127 -128
- metadata +3 -2
@@ -1,211 +1,209 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::RDS
|
9
|
+
class PendingMaintenanceAction
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(target_arn, name, options = {})
|
14
|
+
# @param [String] target_arn
|
15
|
+
# @param [String] name
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :target_arn
|
19
|
+
# @option options [required, String] :name
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@target_arn = extract_target_arn(args, options)
|
24
|
+
@name = extract_name(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def target_arn
|
33
|
+
@target_arn
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
36
|
+
# @return [String]
|
37
|
+
def name
|
38
|
+
@name
|
39
|
+
end
|
40
|
+
alias :action :name
|
41
|
+
|
42
|
+
# The date of the maintenance window when the action will be applied.
|
43
|
+
# The maintenance action will be applied to the resource during its
|
44
|
+
# first maintenance window after this date. If this date is specified,
|
45
|
+
# any `next-maintenance` opt-in requests are ignored.
|
46
|
+
# @return [Time]
|
47
|
+
def auto_applied_after_date
|
48
|
+
data.auto_applied_after_date
|
49
|
+
end
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
51
|
+
# The date when the maintenance action will be automatically applied.
|
52
|
+
# The maintenance action will be applied to the resource on this date
|
53
|
+
# regardless of the maintenance window for the resource. If this date is
|
54
|
+
# specified, any `immediate` opt-in requests are ignored.
|
55
|
+
# @return [Time]
|
56
|
+
def forced_apply_date
|
57
|
+
data.forced_apply_date
|
58
|
+
end
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
60
|
+
# Indicates the type of opt-in request that has been received for the
|
61
|
+
# resource.
|
62
|
+
# @return [String]
|
63
|
+
def opt_in_status
|
64
|
+
data.opt_in_status
|
65
|
+
end
|
67
66
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
67
|
+
# The effective date when the pending maintenance action will be applied
|
68
|
+
# to the resource. This date takes into account opt-in requests received
|
69
|
+
# from the ApplyPendingMaintenanceAction API, the
|
70
|
+
# `AutoAppliedAfterDate`, and the `ForcedApplyDate`. This value is blank
|
71
|
+
# if an opt-in request has not been received and nothing has been
|
72
|
+
# specified as `AutoAppliedAfterDate` or `ForcedApplyDate`.
|
73
|
+
# @return [Time]
|
74
|
+
def current_apply_date
|
75
|
+
data.current_apply_date
|
76
|
+
end
|
78
77
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
78
|
+
# A description providing more detail about the maintenance action.
|
79
|
+
# @return [String]
|
80
|
+
def description
|
81
|
+
data.description
|
82
|
+
end
|
84
83
|
|
85
|
-
|
84
|
+
# @!endgroup
|
86
85
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
86
|
+
# @return [Client]
|
87
|
+
def client
|
88
|
+
@client
|
89
|
+
end
|
91
90
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
91
|
+
# @raise [NotImplementedError]
|
92
|
+
# @api private
|
93
|
+
def load
|
94
|
+
msg = "#load is not implemented, data only available via enumeration"
|
95
|
+
raise NotImplementedError, msg
|
96
|
+
end
|
97
|
+
alias :reload :load
|
98
|
+
|
99
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
100
|
+
# @return [Types::PendingMaintenanceAction]
|
101
|
+
# Returns the data for this {PendingMaintenanceAction}.
|
102
|
+
def data
|
103
|
+
load unless @data
|
104
|
+
@data
|
105
|
+
end
|
107
106
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
107
|
+
# @return [Boolean]
|
108
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
109
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
110
|
+
def data_loaded?
|
111
|
+
!!@data
|
112
|
+
end
|
114
113
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
114
|
+
# @!group Actions
|
115
|
+
|
116
|
+
# @example Request syntax with placeholder values
|
117
|
+
#
|
118
|
+
# pending_maintenance_action.apply_immediately()
|
119
|
+
# @param [Hash] options ({})
|
120
|
+
# @return [ResourcePendingMaintenanceActionList]
|
121
|
+
def apply_immediately(options = {})
|
122
|
+
options = options.merge(
|
123
|
+
apply_action: @name,
|
124
|
+
resource_identifier: @target_arn,
|
125
|
+
opt_in_type: "immediate"
|
126
|
+
)
|
127
|
+
resp = @client.apply_pending_maintenance_action(options)
|
128
|
+
ResourcePendingMaintenanceActionList.new(
|
129
|
+
arn: resp.data.resource_pending_maintenance_actions.resource_identifier,
|
130
|
+
data: resp.data.resource_pending_maintenance_actions,
|
131
|
+
client: @client
|
132
|
+
)
|
133
|
+
end
|
135
134
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
135
|
+
# @example Request syntax with placeholder values
|
136
|
+
#
|
137
|
+
# pending_maintenance_action.undo_opt_in()
|
138
|
+
# @param [Hash] options ({})
|
139
|
+
# @return [ResourcePendingMaintenanceActionList]
|
140
|
+
def undo_opt_in(options = {})
|
141
|
+
options = options.merge(
|
142
|
+
apply_action: @name,
|
143
|
+
resource_identifier: @target_arn,
|
144
|
+
opt_in_type: "undo-opt-in"
|
145
|
+
)
|
146
|
+
resp = @client.apply_pending_maintenance_action(options)
|
147
|
+
ResourcePendingMaintenanceActionList.new(
|
148
|
+
arn: resp.data.resource_pending_maintenance_actions.resource_identifier,
|
149
|
+
data: resp.data.resource_pending_maintenance_actions,
|
150
|
+
client: @client
|
151
|
+
)
|
152
|
+
end
|
154
153
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
154
|
+
# @example Request syntax with placeholder values
|
155
|
+
#
|
156
|
+
# pending_maintenance_action.apply_on_next_maintenance()
|
157
|
+
# @param [Hash] options ({})
|
158
|
+
# @return [ResourcePendingMaintenanceActionList]
|
159
|
+
def apply_on_next_maintenance(options = {})
|
160
|
+
options = options.merge(
|
161
|
+
apply_action: @name,
|
162
|
+
resource_identifier: @target_arn,
|
163
|
+
opt_in_type: "next-maintenance"
|
164
|
+
)
|
165
|
+
resp = @client.apply_pending_maintenance_action(options)
|
166
|
+
ResourcePendingMaintenanceActionList.new(
|
167
|
+
arn: resp.data.resource_pending_maintenance_actions.resource_identifier,
|
168
|
+
data: resp.data.resource_pending_maintenance_actions,
|
169
|
+
client: @client
|
170
|
+
)
|
171
|
+
end
|
173
172
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
private
|
185
|
-
|
186
|
-
def extract_target_arn(args, options)
|
187
|
-
value = args[0] || options.delete(:target_arn)
|
188
|
-
case value
|
189
|
-
when String then value
|
190
|
-
when nil then raise ArgumentError, "missing required option :target_arn"
|
191
|
-
else
|
192
|
-
msg = "expected :target_arn to be a String, got #{value.class}"
|
193
|
-
raise ArgumentError, msg
|
194
|
-
end
|
195
|
-
end
|
173
|
+
# @deprecated
|
174
|
+
# @api private
|
175
|
+
def identifiers
|
176
|
+
{
|
177
|
+
target_arn: @target_arn,
|
178
|
+
name: @name
|
179
|
+
}
|
180
|
+
end
|
181
|
+
deprecated(:identifiers)
|
196
182
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
183
|
+
private
|
184
|
+
|
185
|
+
def extract_target_arn(args, options)
|
186
|
+
value = args[0] || options.delete(:target_arn)
|
187
|
+
case value
|
188
|
+
when String then value
|
189
|
+
when nil then raise ArgumentError, "missing required option :target_arn"
|
190
|
+
else
|
191
|
+
msg = "expected :target_arn to be a String, got #{value.class}"
|
192
|
+
raise ArgumentError, msg
|
206
193
|
end
|
194
|
+
end
|
207
195
|
|
208
|
-
|
196
|
+
def extract_name(args, options)
|
197
|
+
value = args[1] || options.delete(:name)
|
198
|
+
case value
|
199
|
+
when String then value
|
200
|
+
when nil then raise ArgumentError, "missing required option :name"
|
201
|
+
else
|
202
|
+
msg = "expected :name to be a String, got #{value.class}"
|
203
|
+
raise ArgumentError, msg
|
204
|
+
end
|
209
205
|
end
|
206
|
+
|
207
|
+
class Collection < Aws::Resources::Collection; end
|
210
208
|
end
|
211
209
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'aws-sigv4'
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module RDS
|
5
|
+
module Plugins
|
6
|
+
|
7
|
+
# This plugin populates the `:pre_signed_url` request param for the
|
8
|
+
# CopyDBSnapshot API.
|
9
|
+
#
|
10
|
+
# This parameter is required by RDS when copying an encrypted snapshot
|
11
|
+
# across regions. This plugin will be skipped if the `:pre_signed_url`
|
12
|
+
# parameter is provided by the user.
|
13
|
+
class CrossRegionCopying < Seahorse::Client::Plugin
|
14
|
+
|
15
|
+
# @api private
|
16
|
+
class Handler < Seahorse::Client::Handler
|
17
|
+
|
18
|
+
def call(context)
|
19
|
+
params = context.params
|
20
|
+
if params[:source_region] && !params[:pre_signed_url]
|
21
|
+
params[:pre_signed_url] = presigned_url(context, params)
|
22
|
+
params[:destination_region] = context.config.region
|
23
|
+
end
|
24
|
+
@handler.call(context)
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def presigned_url(context, params)
|
29
|
+
# :source_region is not modeled in the api
|
30
|
+
source_region = params.delete(:source_region)
|
31
|
+
param_list = Aws::Query::ParamList.new
|
32
|
+
param_list.set('Action', context.operation.name)
|
33
|
+
param_list.set('DestinationRegion', context.config.region)
|
34
|
+
param_list.set('Version', context.config.api.version)
|
35
|
+
Aws::Query::ParamBuilder.new(param_list).apply(
|
36
|
+
context.operation.input,
|
37
|
+
params
|
38
|
+
)
|
39
|
+
signer = Aws::Sigv4::Signer.new(
|
40
|
+
service: 'rds',
|
41
|
+
region: source_region,
|
42
|
+
credentials_provider: context.config.credentials
|
43
|
+
)
|
44
|
+
url = Aws::Partitions::EndpointProvider.resolve(signer.region, 'rds')
|
45
|
+
url += "?#{param_list.to_s}"
|
46
|
+
signer.presign_url(
|
47
|
+
http_method: 'GET',
|
48
|
+
url: url,
|
49
|
+
body: '',
|
50
|
+
expires_in: 3600
|
51
|
+
).to_s
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
handler(
|
56
|
+
Handler,
|
57
|
+
step: :initialize,
|
58
|
+
operations: [:copy_db_snapshot]
|
59
|
+
)
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|