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,230 +1,228 @@
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 DBClusterParameterGroup
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
8
+ module Aws::RDS
9
+ class DBClusterParameterGroup
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(name, options = {})
14
+ # @param [String] name
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :name
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @name = extract_name(args, options)
22
+ @data = options.delete(:data)
23
+ @client = options.delete(:client) || Client.new(options)
24
+ end
26
25
 
27
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def name
31
- @name
32
- end
33
- alias :db_cluster_parameter_group_name :name
28
+ # @return [String]
29
+ def name
30
+ @name
31
+ end
32
+ alias :db_cluster_parameter_group_name :name
34
33
 
35
- # Provides the name of the DB parameter group family that this DB
36
- # cluster parameter group is compatible with.
37
- # @return [String]
38
- def db_parameter_group_family
39
- data.db_parameter_group_family
40
- end
34
+ # Provides the name of the DB parameter group family that this DB
35
+ # cluster parameter group is compatible with.
36
+ # @return [String]
37
+ def db_parameter_group_family
38
+ data.db_parameter_group_family
39
+ end
41
40
 
42
- # Provides the customer-specified description for this DB cluster
43
- # parameter group.
44
- # @return [String]
45
- def description
46
- data.description
47
- end
41
+ # Provides the customer-specified description for this DB cluster
42
+ # parameter group.
43
+ # @return [String]
44
+ def description
45
+ data.description
46
+ end
48
47
 
49
- # The Amazon Resource Name (ARN) for the DB cluster parameter group.
50
- # @return [String]
51
- def db_cluster_parameter_group_arn
52
- data.db_cluster_parameter_group_arn
53
- end
48
+ # The Amazon Resource Name (ARN) for the DB cluster parameter group.
49
+ # @return [String]
50
+ def db_cluster_parameter_group_arn
51
+ data.db_cluster_parameter_group_arn
52
+ end
54
53
 
55
- # @!endgroup
54
+ # @!endgroup
56
55
 
57
- # @return [Client]
58
- def client
59
- @client
60
- end
56
+ # @return [Client]
57
+ def client
58
+ @client
59
+ end
61
60
 
62
- # Loads, or reloads {#data} for the current {DBClusterParameterGroup}.
63
- # Returns `self` making it possible to chain methods.
64
- #
65
- # db_cluster_parameter_group.reload.data
66
- #
67
- # @return [self]
68
- def load
69
- resp = @client.describe_db_cluster_parameter_groups(db_cluster_parameter_group_name: @name)
70
- @data = resp.dbclusterparametergroups[0]
71
- self
72
- end
73
- alias :reload :load
74
-
75
- # @return [Types::DBClusterParameterGroup]
76
- # Returns the data for this {DBClusterParameterGroup}. Calls
77
- # {Client#describe_db_cluster_parameter_groups} if {#data_loaded?} is `false`.
78
- def data
79
- load unless @data
80
- @data
81
- end
61
+ # Loads, or reloads {#data} for the current {DBClusterParameterGroup}.
62
+ # Returns `self` making it possible to chain methods.
63
+ #
64
+ # db_cluster_parameter_group.reload.data
65
+ #
66
+ # @return [self]
67
+ def load
68
+ resp = @client.describe_db_cluster_parameter_groups(db_cluster_parameter_group_name: @name)
69
+ @data = resp.dbclusterparametergroups[0]
70
+ self
71
+ end
72
+ alias :reload :load
73
+
74
+ # @return [Types::DBClusterParameterGroup]
75
+ # Returns the data for this {DBClusterParameterGroup}. Calls
76
+ # {Client#describe_db_cluster_parameter_groups} if {#data_loaded?} is `false`.
77
+ def data
78
+ load unless @data
79
+ @data
80
+ end
82
81
 
83
- # @return [Boolean]
84
- # Returns `true` if this resource is loaded. Accessing attributes or
85
- # {#data} on an unloaded resource will trigger a call to {#load}.
86
- def data_loaded?
87
- !!@data
88
- end
82
+ # @return [Boolean]
83
+ # Returns `true` if this resource is loaded. Accessing attributes or
84
+ # {#data} on an unloaded resource will trigger a call to {#load}.
85
+ def data_loaded?
86
+ !!@data
87
+ end
89
88
 
90
- # @!group Actions
91
-
92
- # @example Request syntax with placeholder values
93
- #
94
- # dbclusterparametergroup = db_cluster_parameter_group.create({
95
- # db_parameter_group_family: "String", # required
96
- # description: "String", # required
97
- # tags: [
98
- # {
99
- # key: "String",
100
- # value: "String",
101
- # },
102
- # ],
103
- # })
104
- # @param [Hash] options ({})
105
- # @option options [required, String] :db_parameter_group_family
106
- # The DB cluster parameter group family name. A DB cluster parameter
107
- # group can be associated with one and only one DB cluster parameter
108
- # group family, and can be applied only to a DB cluster running a
109
- # database engine and engine version compatible with that DB cluster
110
- # parameter group family.
111
- # @option options [required, String] :description
112
- # The description for the DB cluster parameter group.
113
- # @option options [Array<Types::Tag>] :tags
114
- # A list of tags.
115
- # @return [DBClusterParameterGroup]
116
- def create(options = {})
117
- options = options.merge(db_cluster_parameter_group_name: @name)
118
- resp = @client.create_db_cluster_parameter_group(options)
119
- DBClusterParameterGroup.new(
120
- name: resp.data.db_cluster_parameter_group.db_cluster_parameter_group_name,
121
- data: resp.data.db_cluster_parameter_group,
122
- client: @client
123
- )
124
- end
89
+ # @!group Actions
90
+
91
+ # @example Request syntax with placeholder values
92
+ #
93
+ # dbclusterparametergroup = db_cluster_parameter_group.create({
94
+ # db_parameter_group_family: "String", # required
95
+ # description: "String", # required
96
+ # tags: [
97
+ # {
98
+ # key: "String",
99
+ # value: "String",
100
+ # },
101
+ # ],
102
+ # })
103
+ # @param [Hash] options ({})
104
+ # @option options [required, String] :db_parameter_group_family
105
+ # The DB cluster parameter group family name. A DB cluster parameter
106
+ # group can be associated with one and only one DB cluster parameter
107
+ # group family, and can be applied only to a DB cluster running a
108
+ # database engine and engine version compatible with that DB cluster
109
+ # parameter group family.
110
+ # @option options [required, String] :description
111
+ # The description for the DB cluster parameter group.
112
+ # @option options [Array<Types::Tag>] :tags
113
+ # A list of tags.
114
+ # @return [DBClusterParameterGroup]
115
+ def create(options = {})
116
+ options = options.merge(db_cluster_parameter_group_name: @name)
117
+ resp = @client.create_db_cluster_parameter_group(options)
118
+ DBClusterParameterGroup.new(
119
+ name: resp.data.db_cluster_parameter_group.db_cluster_parameter_group_name,
120
+ data: resp.data.db_cluster_parameter_group,
121
+ client: @client
122
+ )
123
+ end
125
124
 
126
- # @example Request syntax with placeholder values
127
- #
128
- # db_cluster_parameter_group.delete()
129
- # @param [Hash] options ({})
130
- # @return [EmptyStructure]
131
- def delete(options = {})
132
- options = options.merge(db_cluster_parameter_group_name: @name)
133
- resp = @client.delete_db_cluster_parameter_group(options)
134
- resp.data
135
- end
125
+ # @example Request syntax with placeholder values
126
+ #
127
+ # db_cluster_parameter_group.delete()
128
+ # @param [Hash] options ({})
129
+ # @return [EmptyStructure]
130
+ def delete(options = {})
131
+ options = options.merge(db_cluster_parameter_group_name: @name)
132
+ resp = @client.delete_db_cluster_parameter_group(options)
133
+ resp.data
134
+ end
136
135
 
137
- # @example Request syntax with placeholder values
138
- #
139
- # dbclusterparametergroup = db_cluster_parameter_group.modify({
140
- # parameters: [ # required
141
- # {
142
- # parameter_name: "String",
143
- # parameter_value: "String",
144
- # description: "String",
145
- # source: "String",
146
- # apply_type: "String",
147
- # data_type: "String",
148
- # allowed_values: "String",
149
- # is_modifiable: false,
150
- # minimum_engine_version: "String",
151
- # apply_method: "immediate", # accepts immediate, pending-reboot
152
- # },
153
- # ],
154
- # })
155
- # @param [Hash] options ({})
156
- # @option options [required, Array<Types::Parameter>] :parameters
157
- # A list of parameters in the DB cluster parameter group to modify.
158
- # @return [DBClusterParameterGroup]
159
- def modify(options = {})
160
- options = options.merge(db_cluster_parameter_group_name: @name)
161
- resp = @client.modify_db_cluster_parameter_group(options)
162
- DBClusterParameterGroup.new(
163
- name: resp.data.db_cluster_parameter_group_name,
164
- client: @client
165
- )
166
- end
136
+ # @example Request syntax with placeholder values
137
+ #
138
+ # dbclusterparametergroup = db_cluster_parameter_group.modify({
139
+ # parameters: [ # required
140
+ # {
141
+ # parameter_name: "String",
142
+ # parameter_value: "String",
143
+ # description: "String",
144
+ # source: "String",
145
+ # apply_type: "String",
146
+ # data_type: "String",
147
+ # allowed_values: "String",
148
+ # is_modifiable: false,
149
+ # minimum_engine_version: "String",
150
+ # apply_method: "immediate", # accepts immediate, pending-reboot
151
+ # },
152
+ # ],
153
+ # })
154
+ # @param [Hash] options ({})
155
+ # @option options [required, Array<Types::Parameter>] :parameters
156
+ # A list of parameters in the DB cluster parameter group to modify.
157
+ # @return [DBClusterParameterGroup]
158
+ def modify(options = {})
159
+ options = options.merge(db_cluster_parameter_group_name: @name)
160
+ resp = @client.modify_db_cluster_parameter_group(options)
161
+ DBClusterParameterGroup.new(
162
+ name: resp.data.db_cluster_parameter_group_name,
163
+ client: @client
164
+ )
165
+ end
167
166
 
168
- # @example Request syntax with placeholder values
169
- #
170
- # dbclusterparametergroup = db_cluster_parameter_group.reset({
171
- # reset_all_parameters: false,
172
- # parameters: [
173
- # {
174
- # parameter_name: "String",
175
- # parameter_value: "String",
176
- # description: "String",
177
- # source: "String",
178
- # apply_type: "String",
179
- # data_type: "String",
180
- # allowed_values: "String",
181
- # is_modifiable: false,
182
- # minimum_engine_version: "String",
183
- # apply_method: "immediate", # accepts immediate, pending-reboot
184
- # },
185
- # ],
186
- # })
187
- # @param [Hash] options ({})
188
- # @option options [Boolean] :reset_all_parameters
189
- # A value that is set to `true` to reset all parameters in the DB
190
- # cluster parameter group to their default values, and `false`
191
- # otherwise. You cannot use this parameter if there is a list of
192
- # parameter names specified for the `Parameters` parameter.
193
- # @option options [Array<Types::Parameter>] :parameters
194
- # A list of parameter names in the DB cluster parameter group to reset
195
- # to the default values. You cannot use this parameter if the
196
- # `ResetAllParameters` parameter is set to `true`.
197
- # @return [DBClusterParameterGroup]
198
- def reset(options = {})
199
- options = options.merge(db_cluster_parameter_group_name: @name)
200
- resp = @client.reset_db_cluster_parameter_group(options)
201
- DBClusterParameterGroup.new(
202
- name: resp.data.db_cluster_parameter_group_name,
203
- client: @client
204
- )
205
- end
167
+ # @example Request syntax with placeholder values
168
+ #
169
+ # dbclusterparametergroup = db_cluster_parameter_group.reset({
170
+ # reset_all_parameters: false,
171
+ # parameters: [
172
+ # {
173
+ # parameter_name: "String",
174
+ # parameter_value: "String",
175
+ # description: "String",
176
+ # source: "String",
177
+ # apply_type: "String",
178
+ # data_type: "String",
179
+ # allowed_values: "String",
180
+ # is_modifiable: false,
181
+ # minimum_engine_version: "String",
182
+ # apply_method: "immediate", # accepts immediate, pending-reboot
183
+ # },
184
+ # ],
185
+ # })
186
+ # @param [Hash] options ({})
187
+ # @option options [Boolean] :reset_all_parameters
188
+ # A value that is set to `true` to reset all parameters in the DB
189
+ # cluster parameter group to their default values, and `false`
190
+ # otherwise. You cannot use this parameter if there is a list of
191
+ # parameter names specified for the `Parameters` parameter.
192
+ # @option options [Array<Types::Parameter>] :parameters
193
+ # A list of parameter names in the DB cluster parameter group to reset
194
+ # to the default values. You cannot use this parameter if the
195
+ # `ResetAllParameters` parameter is set to `true`.
196
+ # @return [DBClusterParameterGroup]
197
+ def reset(options = {})
198
+ options = options.merge(db_cluster_parameter_group_name: @name)
199
+ resp = @client.reset_db_cluster_parameter_group(options)
200
+ DBClusterParameterGroup.new(
201
+ name: resp.data.db_cluster_parameter_group_name,
202
+ client: @client
203
+ )
204
+ end
206
205
 
207
- # @deprecated
208
- # @api private
209
- def identifiers
210
- { name: @name }
211
- end
212
- deprecated(:identifiers)
213
-
214
- private
215
-
216
- def extract_name(args, options)
217
- value = args[0] || options.delete(:name)
218
- case value
219
- when String then value
220
- when nil then raise ArgumentError, "missing required option :name"
221
- else
222
- msg = "expected :name to be a String, got #{value.class}"
223
- raise ArgumentError, msg
224
- end
206
+ # @deprecated
207
+ # @api private
208
+ def identifiers
209
+ { name: @name }
210
+ end
211
+ deprecated(:identifiers)
212
+
213
+ private
214
+
215
+ def extract_name(args, options)
216
+ value = args[0] || options.delete(:name)
217
+ case value
218
+ when String then value
219
+ when nil then raise ArgumentError, "missing required option :name"
220
+ else
221
+ msg = "expected :name to be a String, got #{value.class}"
222
+ raise ArgumentError, msg
225
223
  end
226
-
227
- class Collection < Aws::Resources::Collection; end
228
224
  end
225
+
226
+ class Collection < Aws::Resources::Collection; end
229
227
  end
230
228
  end
@@ -1,478 +1,476 @@
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 DBClusterSnapshot
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(cluster_id, snapshot_id, options = {})
15
- # @param [String] cluster_id
16
- # @param [String] snapshot_id
17
- # @option options [Client] :client
18
- # @overload def initialize(options = {})
19
- # @option options [required, String] :cluster_id
20
- # @option options [required, String] :snapshot_id
21
- # @option options [Client] :client
22
- def initialize(*args)
23
- options = Hash === args.last ? args.pop.dup : {}
24
- @cluster_id = extract_cluster_id(args, options)
25
- @snapshot_id = extract_snapshot_id(args, options)
26
- @data = options.delete(:data)
27
- @client = options.delete(:client) || Client.new(options)
28
- end
8
+ module Aws::RDS
9
+ class DBClusterSnapshot
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(cluster_id, snapshot_id, options = {})
14
+ # @param [String] cluster_id
15
+ # @param [String] snapshot_id
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :cluster_id
19
+ # @option options [required, String] :snapshot_id
20
+ # @option options [Client] :client
21
+ def initialize(*args)
22
+ options = Hash === args.last ? args.pop.dup : {}
23
+ @cluster_id = extract_cluster_id(args, options)
24
+ @snapshot_id = extract_snapshot_id(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 cluster_id
34
- @cluster_id
35
- end
36
- alias :db_cluster_identifier :cluster_id
31
+ # @return [String]
32
+ def cluster_id
33
+ @cluster_id
34
+ end
35
+ alias :db_cluster_identifier :cluster_id
37
36
 
38
- # @return [String]
39
- def snapshot_id
40
- @snapshot_id
41
- end
42
- alias :db_cluster_snapshot_identifier :snapshot_id
37
+ # @return [String]
38
+ def snapshot_id
39
+ @snapshot_id
40
+ end
41
+ alias :db_cluster_snapshot_identifier :snapshot_id
43
42
 
44
- # Provides the list of EC2 Availability Zones that instances in the DB
45
- # cluster snapshot can be restored in.
46
- # @return [Array<String>]
47
- def availability_zones
48
- data.availability_zones
49
- end
43
+ # Provides the list of EC2 Availability Zones that instances in the DB
44
+ # cluster snapshot can be restored in.
45
+ # @return [Array<String>]
46
+ def availability_zones
47
+ data.availability_zones
48
+ end
50
49
 
51
- # Provides the time when the snapshot was taken, in Universal
52
- # Coordinated Time (UTC).
53
- # @return [Time]
54
- def snapshot_create_time
55
- data.snapshot_create_time
56
- end
50
+ # Provides the time when the snapshot was taken, in Universal
51
+ # Coordinated Time (UTC).
52
+ # @return [Time]
53
+ def snapshot_create_time
54
+ data.snapshot_create_time
55
+ end
57
56
 
58
- # Specifies the name of the database engine.
59
- # @return [String]
60
- def engine
61
- data.engine
62
- end
57
+ # Specifies the name of the database engine.
58
+ # @return [String]
59
+ def engine
60
+ data.engine
61
+ end
63
62
 
64
- # Specifies the allocated storage size in gigabytes (GB).
65
- # @return [Integer]
66
- def allocated_storage
67
- data.allocated_storage
68
- end
63
+ # Specifies the allocated storage size in gigabytes (GB).
64
+ # @return [Integer]
65
+ def allocated_storage
66
+ data.allocated_storage
67
+ end
69
68
 
70
- # Specifies the status of this DB cluster snapshot.
71
- # @return [String]
72
- def status
73
- data.status
74
- end
69
+ # Specifies the status of this DB cluster snapshot.
70
+ # @return [String]
71
+ def status
72
+ data.status
73
+ end
75
74
 
76
- # Specifies the port that the DB cluster was listening on at the time of
77
- # the snapshot.
78
- # @return [Integer]
79
- def port
80
- data.port
81
- end
75
+ # Specifies the port that the DB cluster was listening on at the time of
76
+ # the snapshot.
77
+ # @return [Integer]
78
+ def port
79
+ data.port
80
+ end
82
81
 
83
- # Provides the VPC ID associated with the DB cluster snapshot.
84
- # @return [String]
85
- def vpc_id
86
- data.vpc_id
87
- end
82
+ # Provides the VPC ID associated with the DB cluster snapshot.
83
+ # @return [String]
84
+ def vpc_id
85
+ data.vpc_id
86
+ end
88
87
 
89
- # Specifies the time when the DB cluster was created, in Universal
90
- # Coordinated Time (UTC).
91
- # @return [Time]
92
- def cluster_create_time
93
- data.cluster_create_time
94
- end
88
+ # Specifies the time when the DB cluster was created, in Universal
89
+ # Coordinated Time (UTC).
90
+ # @return [Time]
91
+ def cluster_create_time
92
+ data.cluster_create_time
93
+ end
95
94
 
96
- # Provides the master username for the DB cluster snapshot.
97
- # @return [String]
98
- def master_username
99
- data.master_username
100
- end
95
+ # Provides the master username for the DB cluster snapshot.
96
+ # @return [String]
97
+ def master_username
98
+ data.master_username
99
+ end
101
100
 
102
- # Provides the version of the database engine for this DB cluster
103
- # snapshot.
104
- # @return [String]
105
- def engine_version
106
- data.engine_version
107
- end
101
+ # Provides the version of the database engine for this DB cluster
102
+ # snapshot.
103
+ # @return [String]
104
+ def engine_version
105
+ data.engine_version
106
+ end
108
107
 
109
- # Provides the license model information for this DB cluster snapshot.
110
- # @return [String]
111
- def license_model
112
- data.license_model
113
- end
108
+ # Provides the license model information for this DB cluster snapshot.
109
+ # @return [String]
110
+ def license_model
111
+ data.license_model
112
+ end
114
113
 
115
- # Provides the type of the DB cluster snapshot.
116
- # @return [String]
117
- def snapshot_type
118
- data.snapshot_type
119
- end
114
+ # Provides the type of the DB cluster snapshot.
115
+ # @return [String]
116
+ def snapshot_type
117
+ data.snapshot_type
118
+ end
120
119
 
121
- # Specifies the percentage of the estimated data that has been
122
- # transferred.
123
- # @return [Integer]
124
- def percent_progress
125
- data.percent_progress
126
- end
120
+ # Specifies the percentage of the estimated data that has been
121
+ # transferred.
122
+ # @return [Integer]
123
+ def percent_progress
124
+ data.percent_progress
125
+ end
127
126
 
128
- # Specifies whether the DB cluster snapshot is encrypted.
129
- # @return [Boolean]
130
- def storage_encrypted
131
- data.storage_encrypted
132
- end
127
+ # Specifies whether the DB cluster snapshot is encrypted.
128
+ # @return [Boolean]
129
+ def storage_encrypted
130
+ data.storage_encrypted
131
+ end
133
132
 
134
- # If `StorageEncrypted` is true, the KMS key identifier for the
135
- # encrypted DB cluster snapshot.
136
- # @return [String]
137
- def kms_key_id
138
- data.kms_key_id
139
- end
133
+ # If `StorageEncrypted` is true, the KMS key identifier for the
134
+ # encrypted DB cluster snapshot.
135
+ # @return [String]
136
+ def kms_key_id
137
+ data.kms_key_id
138
+ end
140
139
 
141
- # The Amazon Resource Name (ARN) for the DB cluster snapshot.
142
- # @return [String]
143
- def db_cluster_snapshot_arn
144
- data.db_cluster_snapshot_arn
145
- end
140
+ # The Amazon Resource Name (ARN) for the DB cluster snapshot.
141
+ # @return [String]
142
+ def db_cluster_snapshot_arn
143
+ data.db_cluster_snapshot_arn
144
+ end
146
145
 
147
- # @!endgroup
146
+ # @!endgroup
148
147
 
149
- # @return [Client]
150
- def client
151
- @client
152
- end
148
+ # @return [Client]
149
+ def client
150
+ @client
151
+ end
153
152
 
154
- # Loads, or reloads {#data} for the current {DBClusterSnapshot}.
155
- # Returns `self` making it possible to chain methods.
156
- #
157
- # db_cluster_snapshot.reload.data
158
- #
159
- # @return [self]
160
- def load
161
- resp = @client.describe_db_cluster_snapshots(db_cluster_snapshot_identifier: @snapshot_id)
162
- @data = resp.dbclustersnapshots[0]
163
- self
164
- end
165
- alias :reload :load
166
-
167
- # @return [Types::DBClusterSnapshot]
168
- # Returns the data for this {DBClusterSnapshot}. Calls
169
- # {Client#describe_db_cluster_snapshots} if {#data_loaded?} is `false`.
170
- def data
171
- load unless @data
172
- @data
173
- end
153
+ # Loads, or reloads {#data} for the current {DBClusterSnapshot}.
154
+ # Returns `self` making it possible to chain methods.
155
+ #
156
+ # db_cluster_snapshot.reload.data
157
+ #
158
+ # @return [self]
159
+ def load
160
+ resp = @client.describe_db_cluster_snapshots(db_cluster_snapshot_identifier: @snapshot_id)
161
+ @data = resp.dbclustersnapshots[0]
162
+ self
163
+ end
164
+ alias :reload :load
165
+
166
+ # @return [Types::DBClusterSnapshot]
167
+ # Returns the data for this {DBClusterSnapshot}. Calls
168
+ # {Client#describe_db_cluster_snapshots} if {#data_loaded?} is `false`.
169
+ def data
170
+ load unless @data
171
+ @data
172
+ end
174
173
 
175
- # @return [Boolean]
176
- # Returns `true` if this resource is loaded. Accessing attributes or
177
- # {#data} on an unloaded resource will trigger a call to {#load}.
178
- def data_loaded?
179
- !!@data
180
- end
174
+ # @return [Boolean]
175
+ # Returns `true` if this resource is loaded. Accessing attributes or
176
+ # {#data} on an unloaded resource will trigger a call to {#load}.
177
+ def data_loaded?
178
+ !!@data
179
+ end
181
180
 
182
- # @!group Actions
183
-
184
- # @example Request syntax with placeholder values
185
- #
186
- # dbclustersnapshot = db_cluster_snapshot.create({
187
- # tags: [
188
- # {
189
- # key: "String",
190
- # value: "String",
191
- # },
192
- # ],
193
- # })
194
- # @param [Hash] options ({})
195
- # @option options [Array<Types::Tag>] :tags
196
- # The tags to be assigned to the DB cluster snapshot.
197
- # @return [DBClusterSnapshot]
198
- def create(options = {})
199
- options = options.merge(
200
- db_cluster_identifier: @cluster_id,
201
- db_cluster_snapshot_identifier: @snapshot_id
202
- )
203
- resp = @client.create_db_cluster_snapshot(options)
204
- DBClusterSnapshot.new(
205
- cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
206
- snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier,
207
- data: resp.data.db_cluster_snapshot,
208
- client: @client
209
- )
210
- end
181
+ # @!group Actions
182
+
183
+ # @example Request syntax with placeholder values
184
+ #
185
+ # dbclustersnapshot = db_cluster_snapshot.create({
186
+ # tags: [
187
+ # {
188
+ # key: "String",
189
+ # value: "String",
190
+ # },
191
+ # ],
192
+ # })
193
+ # @param [Hash] options ({})
194
+ # @option options [Array<Types::Tag>] :tags
195
+ # The tags to be assigned to the DB cluster snapshot.
196
+ # @return [DBClusterSnapshot]
197
+ def create(options = {})
198
+ options = options.merge(
199
+ db_cluster_identifier: @cluster_id,
200
+ db_cluster_snapshot_identifier: @snapshot_id
201
+ )
202
+ resp = @client.create_db_cluster_snapshot(options)
203
+ DBClusterSnapshot.new(
204
+ cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
205
+ snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier,
206
+ data: resp.data.db_cluster_snapshot,
207
+ client: @client
208
+ )
209
+ end
211
210
 
212
- # @example Request syntax with placeholder values
213
- #
214
- # dbclustersnapshot = db_cluster_snapshot.copy({
215
- # target_db_cluster_snapshot_identifier: "String", # required
216
- # tags: [
217
- # {
218
- # key: "String",
219
- # value: "String",
220
- # },
221
- # ],
222
- # })
223
- # @param [Hash] options ({})
224
- # @option options [required, String] :target_db_cluster_snapshot_identifier
225
- # The identifier of the new DB cluster snapshot to create from the
226
- # source DB cluster snapshot. This parameter is not case-sensitive.
227
- #
228
- # Constraints:
229
- #
230
- # * Must contain from 1 to 63 alphanumeric characters or hyphens.
231
- #
232
- # * First character must be a letter.
233
- #
234
- # * Cannot end with a hyphen or contain two consecutive hyphens.
235
- #
236
- # Example: `my-cluster-snapshot2`
237
- # @option options [Array<Types::Tag>] :tags
238
- # A list of tags.
239
- # @return [DBClusterSnapshot]
240
- def copy(options = {})
241
- options = options.merge(source_db_cluster_snapshot_identifier: @snapshot_id)
242
- resp = @client.copy_db_cluster_snapshot(options)
243
- DBClusterSnapshot.new(
244
- cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
245
- snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier,
246
- data: resp.data.db_cluster_snapshot,
247
- client: @client
248
- )
249
- end
211
+ # @example Request syntax with placeholder values
212
+ #
213
+ # dbclustersnapshot = db_cluster_snapshot.copy({
214
+ # target_db_cluster_snapshot_identifier: "String", # required
215
+ # tags: [
216
+ # {
217
+ # key: "String",
218
+ # value: "String",
219
+ # },
220
+ # ],
221
+ # })
222
+ # @param [Hash] options ({})
223
+ # @option options [required, String] :target_db_cluster_snapshot_identifier
224
+ # The identifier of the new DB cluster snapshot to create from the
225
+ # source DB cluster snapshot. This parameter is not case-sensitive.
226
+ #
227
+ # Constraints:
228
+ #
229
+ # * Must contain from 1 to 63 alphanumeric characters or hyphens.
230
+ #
231
+ # * First character must be a letter.
232
+ #
233
+ # * Cannot end with a hyphen or contain two consecutive hyphens.
234
+ #
235
+ # Example: `my-cluster-snapshot2`
236
+ # @option options [Array<Types::Tag>] :tags
237
+ # A list of tags.
238
+ # @return [DBClusterSnapshot]
239
+ def copy(options = {})
240
+ options = options.merge(source_db_cluster_snapshot_identifier: @snapshot_id)
241
+ resp = @client.copy_db_cluster_snapshot(options)
242
+ DBClusterSnapshot.new(
243
+ cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
244
+ snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier,
245
+ data: resp.data.db_cluster_snapshot,
246
+ client: @client
247
+ )
248
+ end
250
249
 
251
- # @example Request syntax with placeholder values
252
- #
253
- # dbclustersnapshot = db_cluster_snapshot.delete()
254
- # @param [Hash] options ({})
255
- # @return [DBClusterSnapshot]
256
- def delete(options = {})
257
- options = options.merge(db_cluster_snapshot_identifier: @snapshot_id)
258
- resp = @client.delete_db_cluster_snapshot(options)
259
- DBClusterSnapshot.new(
260
- cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
261
- snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier,
262
- data: resp.data.db_cluster_snapshot,
263
- client: @client
264
- )
265
- end
250
+ # @example Request syntax with placeholder values
251
+ #
252
+ # db_cluster_snapshot.delete()
253
+ # @param [Hash] options ({})
254
+ # @return [DBClusterSnapshot]
255
+ def delete(options = {})
256
+ options = options.merge(db_cluster_snapshot_identifier: @snapshot_id)
257
+ resp = @client.delete_db_cluster_snapshot(options)
258
+ DBClusterSnapshot.new(
259
+ cluster_id: resp.data.db_cluster_snapshot.db_cluster_identifier,
260
+ snapshot_id: resp.data.db_cluster_snapshot.db_cluster_snapshot_identifier,
261
+ data: resp.data.db_cluster_snapshot,
262
+ client: @client
263
+ )
264
+ end
266
265
 
267
- # @example Request syntax with placeholder values
268
- #
269
- # dbcluster = db_cluster_snapshot.restore({
270
- # availability_zones: ["String"],
271
- # db_cluster_identifier: "String", # required
272
- # engine: "String", # required
273
- # engine_version: "String",
274
- # port: 1,
275
- # db_subnet_group_name: "String",
276
- # database_name: "String",
277
- # option_group_name: "String",
278
- # vpc_security_group_ids: ["String"],
279
- # tags: [
280
- # {
281
- # key: "String",
282
- # value: "String",
283
- # },
284
- # ],
285
- # kms_key_id: "String",
286
- # })
287
- # @param [Hash] options ({})
288
- # @option options [Array<String>] :availability_zones
289
- # Provides the list of EC2 Availability Zones that instances in the
290
- # restored DB cluster can be created in.
291
- # @option options [required, String] :db_cluster_identifier
292
- # The name of the DB cluster to create from the DB cluster snapshot.
293
- # This parameter isn't case-sensitive.
294
- #
295
- # Constraints:
296
- #
297
- # * Must contain from 1 to 255 alphanumeric characters or hyphens
298
- #
299
- # * First character must be a letter
300
- #
301
- # * Cannot end with a hyphen or contain two consecutive hyphens
302
- #
303
- # Example: `my-snapshot-id`
304
- # @option options [required, String] :engine
305
- # The database engine to use for the new DB cluster.
306
- #
307
- # Default: The same as source
308
- #
309
- # Constraint: Must be compatible with the engine of the source
310
- # @option options [String] :engine_version
311
- # The version of the database engine to use for the new DB cluster.
312
- # @option options [Integer] :port
313
- # The port number on which the new DB cluster accepts connections.
314
- #
315
- # Constraints: Value must be `1150-65535`
316
- #
317
- # Default: The same port as the original DB cluster.
318
- # @option options [String] :db_subnet_group_name
319
- # The name of the DB subnet group to use for the new DB cluster.
320
- #
321
- # Constraints: Must contain no more than 255 alphanumeric characters,
322
- # periods, underscores, spaces, or hyphens. Must not be default.
323
- #
324
- # Example: `mySubnetgroup`
325
- # @option options [String] :database_name
326
- # The database name for the restored DB cluster.
327
- # @option options [String] :option_group_name
328
- # The name of the option group to use for the restored DB cluster.
329
- # @option options [Array<String>] :vpc_security_group_ids
330
- # A list of VPC security groups that the new DB cluster will belong to.
331
- # @option options [Array<Types::Tag>] :tags
332
- # The tags to be assigned to the restored DB cluster.
333
- # @option options [String] :kms_key_id
334
- # The KMS key identifier to use when restoring an encrypted DB cluster
335
- # from a DB cluster snapshot.
336
- #
337
- # The KMS key identifier is the Amazon Resource Name (ARN) for the KMS
338
- # encryption key. If you are restoring a DB cluster with the same AWS
339
- # account that owns the KMS encryption key used to encrypt the new DB
340
- # cluster, then you can use the KMS key alias instead of the ARN for the
341
- # KMS encryption key.
342
- #
343
- # If you do not specify a value for the `KmsKeyId` parameter, then the
344
- # following will occur:
345
- #
346
- # * If the DB cluster snapshot is encrypted, then the restored DB
347
- # cluster is encrypted using the KMS key that was used to encrypt the
348
- # DB cluster snapshot.
349
- #
350
- # * If the DB cluster snapshot is not encrypted, then the restored DB
351
- # cluster is encrypted using the specified encryption key.
352
- # @return [DBCluster]
353
- def restore(options = {})
354
- options = options.merge(snapshot_identifier: @snapshot_id)
355
- resp = @client.restore_db_cluster_from_snapshot(options)
356
- DBCluster.new(
357
- id: resp.data.db_cluster.db_cluster_identifier,
358
- data: resp.data.db_cluster,
359
- client: @client
360
- )
361
- end
266
+ # @example Request syntax with placeholder values
267
+ #
268
+ # dbcluster = db_cluster_snapshot.restore({
269
+ # availability_zones: ["String"],
270
+ # db_cluster_identifier: "String", # required
271
+ # engine: "String", # required
272
+ # engine_version: "String",
273
+ # port: 1,
274
+ # db_subnet_group_name: "String",
275
+ # database_name: "String",
276
+ # option_group_name: "String",
277
+ # vpc_security_group_ids: ["String"],
278
+ # tags: [
279
+ # {
280
+ # key: "String",
281
+ # value: "String",
282
+ # },
283
+ # ],
284
+ # kms_key_id: "String",
285
+ # })
286
+ # @param [Hash] options ({})
287
+ # @option options [Array<String>] :availability_zones
288
+ # Provides the list of EC2 Availability Zones that instances in the
289
+ # restored DB cluster can be created in.
290
+ # @option options [required, String] :db_cluster_identifier
291
+ # The name of the DB cluster to create from the DB cluster snapshot.
292
+ # This parameter isn't case-sensitive.
293
+ #
294
+ # Constraints:
295
+ #
296
+ # * Must contain from 1 to 255 alphanumeric characters or hyphens
297
+ #
298
+ # * First character must be a letter
299
+ #
300
+ # * Cannot end with a hyphen or contain two consecutive hyphens
301
+ #
302
+ # Example: `my-snapshot-id`
303
+ # @option options [required, String] :engine
304
+ # The database engine to use for the new DB cluster.
305
+ #
306
+ # Default: The same as source
307
+ #
308
+ # Constraint: Must be compatible with the engine of the source
309
+ # @option options [String] :engine_version
310
+ # The version of the database engine to use for the new DB cluster.
311
+ # @option options [Integer] :port
312
+ # The port number on which the new DB cluster accepts connections.
313
+ #
314
+ # Constraints: Value must be `1150-65535`
315
+ #
316
+ # Default: The same port as the original DB cluster.
317
+ # @option options [String] :db_subnet_group_name
318
+ # The name of the DB subnet group to use for the new DB cluster.
319
+ #
320
+ # Constraints: Must contain no more than 255 alphanumeric characters,
321
+ # periods, underscores, spaces, or hyphens. Must not be default.
322
+ #
323
+ # Example: `mySubnetgroup`
324
+ # @option options [String] :database_name
325
+ # The database name for the restored DB cluster.
326
+ # @option options [String] :option_group_name
327
+ # The name of the option group to use for the restored DB cluster.
328
+ # @option options [Array<String>] :vpc_security_group_ids
329
+ # A list of VPC security groups that the new DB cluster will belong to.
330
+ # @option options [Array<Types::Tag>] :tags
331
+ # The tags to be assigned to the restored DB cluster.
332
+ # @option options [String] :kms_key_id
333
+ # The KMS key identifier to use when restoring an encrypted DB cluster
334
+ # from a DB cluster snapshot.
335
+ #
336
+ # The KMS key identifier is the Amazon Resource Name (ARN) for the KMS
337
+ # encryption key. If you are restoring a DB cluster with the same AWS
338
+ # account that owns the KMS encryption key used to encrypt the new DB
339
+ # cluster, then you can use the KMS key alias instead of the ARN for the
340
+ # KMS encryption key.
341
+ #
342
+ # If you do not specify a value for the `KmsKeyId` parameter, then the
343
+ # following will occur:
344
+ #
345
+ # * If the DB cluster snapshot is encrypted, then the restored DB
346
+ # cluster is encrypted using the KMS key that was used to encrypt the
347
+ # DB cluster snapshot.
348
+ #
349
+ # * If the DB cluster snapshot is not encrypted, then the restored DB
350
+ # cluster is encrypted using the specified encryption key.
351
+ # @return [DBCluster]
352
+ def restore(options = {})
353
+ options = options.merge(snapshot_identifier: @snapshot_id)
354
+ resp = @client.restore_db_cluster_from_snapshot(options)
355
+ DBCluster.new(
356
+ id: resp.data.db_cluster.db_cluster_identifier,
357
+ data: resp.data.db_cluster,
358
+ client: @client
359
+ )
360
+ end
362
361
 
363
- # @!group Associations
362
+ # @!group Associations
364
363
 
365
- # @return [DBCluster]
366
- def cluster
367
- DBCluster.new(
368
- id: @cluster_id,
369
- client: @client
370
- )
371
- end
364
+ # @return [DBCluster]
365
+ def cluster
366
+ DBCluster.new(
367
+ id: @cluster_id,
368
+ client: @client
369
+ )
370
+ end
372
371
 
373
- # @example Request syntax with placeholder values
374
- #
375
- # events = db_cluster_snapshot.events({
376
- # start_time: Time.now,
377
- # end_time: Time.now,
378
- # duration: 1,
379
- # event_categories: ["String"],
380
- # filters: [
381
- # {
382
- # name: "String", # required
383
- # values: ["String"], # required
384
- # },
385
- # ],
386
- # })
387
- # @param [Hash] options ({})
388
- # @option options [Time,DateTime,Date,Integer,String] :start_time
389
- # The beginning of the time interval to retrieve events for, specified
390
- # in ISO 8601 format. For more information about ISO 8601, go to the
391
- # [ISO8601 Wikipedia page.][1]
392
- #
393
- # Example: 2009-07-08T18:00Z
394
- #
395
- #
396
- #
397
- # [1]: http://en.wikipedia.org/wiki/ISO_8601
398
- # @option options [Time,DateTime,Date,Integer,String] :end_time
399
- # The end of the time interval for which to retrieve events, specified
400
- # in ISO 8601 format. For more information about ISO 8601, go to the
401
- # [ISO8601 Wikipedia page.][1]
402
- #
403
- # Example: 2009-07-08T18:00Z
404
- #
405
- #
406
- #
407
- # [1]: http://en.wikipedia.org/wiki/ISO_8601
408
- # @option options [Integer] :duration
409
- # The number of minutes to retrieve events for.
410
- #
411
- # Default: 60
412
- # @option options [Array<String>] :event_categories
413
- # A list of event categories that trigger notifications for a event
414
- # notification subscription.
415
- # @option options [Array<Types::Filter>] :filters
416
- # This parameter is not currently supported.
417
- # @return [Event::Collection]
418
- def events(options = {})
419
- batches = Enumerator.new do |y|
420
- options = options.merge(
421
- source_type: "db-cluster-snapshot",
422
- source_identifier: @snapshot_id
423
- )
424
- resp = @client.describe_events(options)
425
- resp.each_page do |page|
426
- batch = []
427
- page.data.events.each do |e|
428
- batch << Event.new(
429
- source_id: e.source_identifier,
430
- date: e.date,
431
- data: e,
432
- client: @client
433
- )
434
- end
435
- y.yield(batch)
372
+ # @example Request syntax with placeholder values
373
+ #
374
+ # events = db_cluster_snapshot.events({
375
+ # start_time: Time.now,
376
+ # end_time: Time.now,
377
+ # duration: 1,
378
+ # event_categories: ["String"],
379
+ # filters: [
380
+ # {
381
+ # name: "String", # required
382
+ # values: ["String"], # required
383
+ # },
384
+ # ],
385
+ # })
386
+ # @param [Hash] options ({})
387
+ # @option options [Time,DateTime,Date,Integer,String] :start_time
388
+ # The beginning of the time interval to retrieve events for, specified
389
+ # in ISO 8601 format. For more information about ISO 8601, go to the
390
+ # [ISO8601 Wikipedia page.][1]
391
+ #
392
+ # Example: 2009-07-08T18:00Z
393
+ #
394
+ #
395
+ #
396
+ # [1]: http://en.wikipedia.org/wiki/ISO_8601
397
+ # @option options [Time,DateTime,Date,Integer,String] :end_time
398
+ # The end of the time interval for which to retrieve events, specified
399
+ # in ISO 8601 format. For more information about ISO 8601, go to the
400
+ # [ISO8601 Wikipedia page.][1]
401
+ #
402
+ # Example: 2009-07-08T18:00Z
403
+ #
404
+ #
405
+ #
406
+ # [1]: http://en.wikipedia.org/wiki/ISO_8601
407
+ # @option options [Integer] :duration
408
+ # The number of minutes to retrieve events for.
409
+ #
410
+ # Default: 60
411
+ # @option options [Array<String>] :event_categories
412
+ # A list of event categories that trigger notifications for a event
413
+ # notification subscription.
414
+ # @option options [Array<Types::Filter>] :filters
415
+ # This parameter is not currently supported.
416
+ # @return [Event::Collection]
417
+ def events(options = {})
418
+ batches = Enumerator.new do |y|
419
+ options = options.merge(
420
+ source_type: "db-cluster-snapshot",
421
+ source_identifier: @snapshot_id
422
+ )
423
+ resp = @client.describe_events(options)
424
+ resp.each_page do |page|
425
+ batch = []
426
+ page.data.events.each do |e|
427
+ batch << Event.new(
428
+ source_id: e.source_identifier,
429
+ date: e.date,
430
+ data: e,
431
+ client: @client
432
+ )
436
433
  end
434
+ y.yield(batch)
437
435
  end
438
- Event::Collection.new(batches)
439
436
  end
437
+ Event::Collection.new(batches)
438
+ end
440
439
 
441
- # @deprecated
442
- # @api private
443
- def identifiers
444
- {
445
- cluster_id: @cluster_id,
446
- snapshot_id: @snapshot_id
447
- }
448
- end
449
- deprecated(:identifiers)
450
-
451
- private
452
-
453
- def extract_cluster_id(args, options)
454
- value = args[0] || options.delete(:cluster_id)
455
- case value
456
- when String then value
457
- when nil then raise ArgumentError, "missing required option :cluster_id"
458
- else
459
- msg = "expected :cluster_id to be a String, got #{value.class}"
460
- raise ArgumentError, msg
461
- end
462
- end
440
+ # @deprecated
441
+ # @api private
442
+ def identifiers
443
+ {
444
+ cluster_id: @cluster_id,
445
+ snapshot_id: @snapshot_id
446
+ }
447
+ end
448
+ deprecated(:identifiers)
463
449
 
464
- def extract_snapshot_id(args, options)
465
- value = args[1] || options.delete(:snapshot_id)
466
- case value
467
- when String then value
468
- when nil then raise ArgumentError, "missing required option :snapshot_id"
469
- else
470
- msg = "expected :snapshot_id to be a String, got #{value.class}"
471
- raise ArgumentError, msg
472
- end
450
+ private
451
+
452
+ def extract_cluster_id(args, options)
453
+ value = args[0] || options.delete(:cluster_id)
454
+ case value
455
+ when String then value
456
+ when nil then raise ArgumentError, "missing required option :cluster_id"
457
+ else
458
+ msg = "expected :cluster_id to be a String, got #{value.class}"
459
+ raise ArgumentError, msg
473
460
  end
461
+ end
474
462
 
475
- class Collection < Aws::Resources::Collection; end
463
+ def extract_snapshot_id(args, options)
464
+ value = args[1] || options.delete(:snapshot_id)
465
+ case value
466
+ when String then value
467
+ when nil then raise ArgumentError, "missing required option :snapshot_id"
468
+ else
469
+ msg = "expected :snapshot_id to be a String, got #{value.class}"
470
+ raise ArgumentError, msg
471
+ end
476
472
  end
473
+
474
+ class Collection < Aws::Resources::Collection; end
477
475
  end
478
476
  end