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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aws-sdk-rds.rb +2 -2
  3. data/lib/aws-sdk-rds/account_quota.rb +79 -81
  4. data/lib/aws-sdk-rds/certificate.rb +99 -101
  5. data/lib/aws-sdk-rds/client.rb +10575 -9119
  6. data/lib/aws-sdk-rds/client_api.rb +3049 -3023
  7. data/lib/aws-sdk-rds/db_cluster.rb +1005 -1007
  8. data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +204 -206
  9. data/lib/aws-sdk-rds/db_cluster_snapshot.rb +430 -432
  10. data/lib/aws-sdk-rds/db_engine.rb +208 -210
  11. data/lib/aws-sdk-rds/db_engine_version.rb +218 -219
  12. data/lib/aws-sdk-rds/db_instance.rb +2747 -2567
  13. data/lib/aws-sdk-rds/db_log_file.rb +145 -147
  14. data/lib/aws-sdk-rds/db_parameter_group.rb +411 -413
  15. data/lib/aws-sdk-rds/db_parameter_group_family.rb +135 -137
  16. data/lib/aws-sdk-rds/db_security_group.rb +316 -318
  17. data/lib/aws-sdk-rds/db_snapshot.rb +705 -650
  18. data/lib/aws-sdk-rds/db_snapshot_attribute.rb +137 -139
  19. data/lib/aws-sdk-rds/db_subnet_group.rb +161 -163
  20. data/lib/aws-sdk-rds/errors.rb +4 -13
  21. data/lib/aws-sdk-rds/event.rb +108 -110
  22. data/lib/aws-sdk-rds/event_category_map.rb +73 -75
  23. data/lib/aws-sdk-rds/event_subscription.rb +313 -315
  24. data/lib/aws-sdk-rds/option_group.rb +247 -249
  25. data/lib/aws-sdk-rds/option_group_option.rb +135 -137
  26. data/lib/aws-sdk-rds/parameter.rb +116 -118
  27. data/lib/aws-sdk-rds/pending_maintenance_action.rb +182 -184
  28. data/lib/aws-sdk-rds/plugins/cross_region_copying.rb +64 -0
  29. data/lib/aws-sdk-rds/reserved_db_instance.rb +156 -158
  30. data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +154 -156
  31. data/lib/aws-sdk-rds/resource.rb +2395 -2288
  32. data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +89 -91
  33. data/lib/aws-sdk-rds/types.rb +12091 -10977
  34. data/lib/aws-sdk-rds/waiters.rb +127 -128
  35. metadata +3 -2
@@ -1,211 +1,209 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
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
- module RDS
10
- class PendingMaintenanceAction
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(target_arn, name, options = {})
15
- # @param [String] target_arn
16
- # @param [String] name
17
- # @option options [Client] :client
18
- # @overload def initialize(options = {})
19
- # @option options [required, String] :target_arn
20
- # @option options [required, String] :name
21
- # @option options [Client] :client
22
- def initialize(*args)
23
- options = Hash === args.last ? args.pop.dup : {}
24
- @target_arn = extract_target_arn(args, options)
25
- @name = extract_name(args, options)
26
- @data = options.delete(:data)
27
- @client = options.delete(:client) || Client.new(options)
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
- # @!group Read-Only Attributes
29
+ # @!group Read-Only Attributes
31
30
 
32
- # @return [String]
33
- def target_arn
34
- @target_arn
35
- end
31
+ # @return [String]
32
+ def target_arn
33
+ @target_arn
34
+ end
36
35
 
37
- # @return [String]
38
- def name
39
- @name
40
- end
41
- alias :action :name
42
-
43
- # The date of the maintenance window when the action will be applied.
44
- # The maintenance action will be applied to the resource during its
45
- # first maintenance window after this date. If this date is specified,
46
- # any `next-maintenance` opt-in requests are ignored.
47
- # @return [Time]
48
- def auto_applied_after_date
49
- data.auto_applied_after_date
50
- end
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
- # The date when the maintenance action will be automatically applied.
53
- # The maintenance action will be applied to the resource on this date
54
- # regardless of the maintenance window for the resource. If this date is
55
- # specified, any `immediate` opt-in requests are ignored.
56
- # @return [Time]
57
- def forced_apply_date
58
- data.forced_apply_date
59
- end
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
- # Indicates the type of opt-in request that has been received for the
62
- # resource.
63
- # @return [String]
64
- def opt_in_status
65
- data.opt_in_status
66
- end
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
- # The effective date when the pending maintenance action will be applied
69
- # to the resource. This date takes into account opt-in requests received
70
- # from the ApplyPendingMaintenanceAction API, the
71
- # `AutoAppliedAfterDate`, and the `ForcedApplyDate`. This value is blank
72
- # if an opt-in request has not been received and nothing has been
73
- # specified as `AutoAppliedAfterDate` or `ForcedApplyDate`.
74
- # @return [Time]
75
- def current_apply_date
76
- data.current_apply_date
77
- end
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
- # A description providing more detail about the maintenance action.
80
- # @return [String]
81
- def description
82
- data.description
83
- end
78
+ # A description providing more detail about the maintenance action.
79
+ # @return [String]
80
+ def description
81
+ data.description
82
+ end
84
83
 
85
- # @!endgroup
84
+ # @!endgroup
86
85
 
87
- # @return [Client]
88
- def client
89
- @client
90
- end
86
+ # @return [Client]
87
+ def client
88
+ @client
89
+ end
91
90
 
92
- # @raise [Errors::ResourceNotLoadable]
93
- # @api private
94
- def load
95
- msg = "#load is not implemented, data only available via enumeration"
96
- raise Errors::ResourceNotLoadable, msg
97
- end
98
- alias :reload :load
99
-
100
- # @raise [Errors::ResourceNotLoadableError] Raises when {#data_loaded?} is `false`.
101
- # @return [Types::PendingMaintenanceAction]
102
- # Returns the data for this {PendingMaintenanceAction}.
103
- def data
104
- load unless @data
105
- @data
106
- end
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
- # @return [Boolean]
109
- # Returns `true` if this resource is loaded. Accessing attributes or
110
- # {#data} on an unloaded resource will trigger a call to {#load}.
111
- def data_loaded?
112
- !!@data
113
- end
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
- # @!group Actions
116
-
117
- # @example Request syntax with placeholder values
118
- #
119
- # resourcependingmaintenanceactionlist = pending_maintenance_action.apply_immediately()
120
- # @param [Hash] options ({})
121
- # @return [ResourcePendingMaintenanceActionList]
122
- def apply_immediately(options = {})
123
- options = options.merge(
124
- apply_action: @name,
125
- resource_identifier: @target_arn,
126
- opt_in_type: "immediate"
127
- )
128
- resp = @client.apply_pending_maintenance_action(options)
129
- ResourcePendingMaintenanceActionList.new(
130
- arn: resp.data.resource_pending_maintenance_actions.resource_identifier,
131
- data: resp.data.resource_pending_maintenance_actions,
132
- client: @client
133
- )
134
- end
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
- # @example Request syntax with placeholder values
137
- #
138
- # resourcependingmaintenanceactionlist = pending_maintenance_action.undo_opt_in()
139
- # @param [Hash] options ({})
140
- # @return [ResourcePendingMaintenanceActionList]
141
- def undo_opt_in(options = {})
142
- options = options.merge(
143
- apply_action: @name,
144
- resource_identifier: @target_arn,
145
- opt_in_type: "undo-opt-in"
146
- )
147
- resp = @client.apply_pending_maintenance_action(options)
148
- ResourcePendingMaintenanceActionList.new(
149
- arn: resp.data.resource_pending_maintenance_actions.resource_identifier,
150
- data: resp.data.resource_pending_maintenance_actions,
151
- client: @client
152
- )
153
- end
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
- # @example Request syntax with placeholder values
156
- #
157
- # resourcependingmaintenanceactionlist = pending_maintenance_action.apply_on_next_maintenance()
158
- # @param [Hash] options ({})
159
- # @return [ResourcePendingMaintenanceActionList]
160
- def apply_on_next_maintenance(options = {})
161
- options = options.merge(
162
- apply_action: @name,
163
- resource_identifier: @target_arn,
164
- opt_in_type: "next-maintenance"
165
- )
166
- resp = @client.apply_pending_maintenance_action(options)
167
- ResourcePendingMaintenanceActionList.new(
168
- arn: resp.data.resource_pending_maintenance_actions.resource_identifier,
169
- data: resp.data.resource_pending_maintenance_actions,
170
- client: @client
171
- )
172
- end
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
- # @deprecated
175
- # @api private
176
- def identifiers
177
- {
178
- target_arn: @target_arn,
179
- name: @name
180
- }
181
- end
182
- deprecated(:identifiers)
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
- def extract_name(args, options)
198
- value = args[1] || options.delete(:name)
199
- case value
200
- when String then value
201
- when nil then raise ArgumentError, "missing required option :name"
202
- else
203
- msg = "expected :name to be a String, got #{value.class}"
204
- raise ArgumentError, msg
205
- end
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
- class Collection < Aws::Resources::Collection; end
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