aws-sdk-iam 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,178 +1,178 @@
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 IAM
10
- class GroupPolicy
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(group_name, name, options = {})
15
- # @param [String] group_name
16
- # @param [String] name
17
- # @option options [Client] :client
18
- # @overload def initialize(options = {})
19
- # @option options [required, String] :group_name
20
- # @option options [required, String] :name
21
- # @option options [Client] :client
22
- def initialize(*args)
23
- options = Hash === args.last ? args.pop.dup : {}
24
- @group_name = extract_group_name(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::IAM
9
+ class GroupPolicy
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(group_name, name, options = {})
14
+ # @param [String] group_name
15
+ # @param [String] name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :group_name
19
+ # @option options [required, String] :name
20
+ # @option options [Client] :client
21
+ def initialize(*args)
22
+ options = Hash === args.last ? args.pop.dup : {}
23
+ @group_name = extract_group_name(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 group_name
34
- @group_name
35
- end
31
+ # @return [String]
32
+ def group_name
33
+ @group_name
34
+ end
36
35
 
37
- # @return [String]
38
- def name
39
- @name
40
- end
41
- alias :policy_name :name
36
+ # @return [String]
37
+ def name
38
+ @name
39
+ end
40
+ alias :policy_name :name
42
41
 
43
- # The policy document.
44
- # @return [String]
45
- def policy_document
46
- data.policy_document
47
- end
42
+ # The policy document.
43
+ # @return [String]
44
+ def policy_document
45
+ data.policy_document
46
+ end
48
47
 
49
- # @!endgroup
48
+ # @!endgroup
50
49
 
51
- # @return [Client]
52
- def client
53
- @client
54
- end
50
+ # @return [Client]
51
+ def client
52
+ @client
53
+ end
55
54
 
56
- # Loads, or reloads {#data} for the current {GroupPolicy}.
57
- # Returns `self` making it possible to chain methods.
58
- #
59
- # group_policy.reload.data
60
- #
61
- # @return [self]
62
- def load
63
- resp = @client.get_group_policy(
64
- group_name: @group_name,
65
- policy_name: @name
66
- )
67
- @data = resp.data
68
- self
69
- end
70
- alias :reload :load
71
-
72
- # @return [Types::GetGroupPolicyResponse]
73
- # Returns the data for this {GroupPolicy}. Calls
74
- # {Client#get_group_policy} if {#data_loaded?} is `false`.
75
- def data
76
- load unless @data
77
- @data
78
- end
55
+ # Loads, or reloads {#data} for the current {GroupPolicy}.
56
+ # Returns `self` making it possible to chain methods.
57
+ #
58
+ # group_policy.reload.data
59
+ #
60
+ # @return [self]
61
+ def load
62
+ resp = @client.get_group_policy(
63
+ group_name: @group_name,
64
+ policy_name: @name
65
+ )
66
+ @data = resp.data
67
+ self
68
+ end
69
+ alias :reload :load
70
+
71
+ # @return [Types::GetGroupPolicyResponse]
72
+ # Returns the data for this {GroupPolicy}. Calls
73
+ # {Client#get_group_policy} if {#data_loaded?} is `false`.
74
+ def data
75
+ load unless @data
76
+ @data
77
+ end
79
78
 
80
- # @return [Boolean]
81
- # Returns `true` if this resource is loaded. Accessing attributes or
82
- # {#data} on an unloaded resource will trigger a call to {#load}.
83
- def data_loaded?
84
- !!@data
85
- end
79
+ # @return [Boolean]
80
+ # Returns `true` if this resource is loaded. Accessing attributes or
81
+ # {#data} on an unloaded resource will trigger a call to {#load}.
82
+ def data_loaded?
83
+ !!@data
84
+ end
86
85
 
87
- # @!group Actions
88
-
89
- # @example Request syntax with placeholder values
90
- #
91
- # group_policy.delete()
92
- # @param [Hash] options ({})
93
- # @return [EmptyStructure]
94
- def delete(options = {})
95
- options = options.merge(
96
- group_name: @group_name,
97
- policy_name: @name
98
- )
99
- resp = @client.delete_group_policy(options)
100
- resp.data
101
- end
86
+ # @!group Actions
87
+
88
+ # @example Request syntax with placeholder values
89
+ #
90
+ # group_policy.delete()
91
+ # @param [Hash] options ({})
92
+ # @return [EmptyStructure]
93
+ def delete(options = {})
94
+ options = options.merge(
95
+ group_name: @group_name,
96
+ policy_name: @name
97
+ )
98
+ resp = @client.delete_group_policy(options)
99
+ resp.data
100
+ end
102
101
 
103
- # @example Request syntax with placeholder values
104
- #
105
- # group_policy.put({
106
- # policy_document: "policyDocumentType", # required
107
- # })
108
- # @param [Hash] options ({})
109
- # @option options [required, String] :policy_document
110
- # The policy document.
111
- #
112
- # The [regex pattern][1] for this parameter is a string of characters
113
- # consisting of any printable ASCII character ranging from the space
114
- # character (\\u0020) through end of the ASCII character range
115
- # (\\u00FF). It also includes the special characters tab (\\u0009), line
116
- # feed (\\u000A), and carriage return (\\u000D).
117
- #
118
- #
119
- #
120
- # [1]: http://wikipedia.org/wiki/regex
121
- # @return [EmptyStructure]
122
- def put(options = {})
123
- options = options.merge(
124
- group_name: @group_name,
125
- policy_name: @name
126
- )
127
- resp = @client.put_group_policy(options)
128
- resp.data
129
- end
102
+ # @example Request syntax with placeholder values
103
+ #
104
+ # group_policy.put({
105
+ # policy_document: "policyDocumentType", # required
106
+ # })
107
+ # @param [Hash] options ({})
108
+ # @option options [required, String] :policy_document
109
+ # The policy document.
110
+ #
111
+ # The [regex pattern][1] used to validate this parameter is a string of
112
+ # characters consisting of any printable ASCII character ranging from
113
+ # the space character (\\u0020) through end of the ASCII character range
114
+ # as well as the printable characters in the Basic Latin and Latin-1
115
+ # Supplement character set (through \\u00FF). It also includes the
116
+ # special characters tab (\\u0009), line feed (\\u000A), and carriage
117
+ # return (\\u000D).
118
+ #
119
+ #
120
+ #
121
+ # [1]: http://wikipedia.org/wiki/regex
122
+ # @return [EmptyStructure]
123
+ def put(options = {})
124
+ options = options.merge(
125
+ group_name: @group_name,
126
+ policy_name: @name
127
+ )
128
+ resp = @client.put_group_policy(options)
129
+ resp.data
130
+ end
130
131
 
131
- # @!group Associations
132
+ # @!group Associations
132
133
 
133
- # @return [Group]
134
- def group
135
- Group.new(
136
- name: @group_name,
137
- client: @client
138
- )
139
- end
134
+ # @return [Group]
135
+ def group
136
+ Group.new(
137
+ name: @group_name,
138
+ client: @client
139
+ )
140
+ end
140
141
 
141
- # @deprecated
142
- # @api private
143
- def identifiers
144
- {
145
- group_name: @group_name,
146
- name: @name
147
- }
148
- end
149
- deprecated(:identifiers)
150
-
151
- private
152
-
153
- def extract_group_name(args, options)
154
- value = args[0] || options.delete(:group_name)
155
- case value
156
- when String then value
157
- when nil then raise ArgumentError, "missing required option :group_name"
158
- else
159
- msg = "expected :group_name to be a String, got #{value.class}"
160
- raise ArgumentError, msg
161
- end
142
+ # @deprecated
143
+ # @api private
144
+ def identifiers
145
+ {
146
+ group_name: @group_name,
147
+ name: @name
148
+ }
149
+ end
150
+ deprecated(:identifiers)
151
+
152
+ private
153
+
154
+ def extract_group_name(args, options)
155
+ value = args[0] || options.delete(:group_name)
156
+ case value
157
+ when String then value
158
+ when nil then raise ArgumentError, "missing required option :group_name"
159
+ else
160
+ msg = "expected :group_name to be a String, got #{value.class}"
161
+ raise ArgumentError, msg
162
162
  end
163
+ end
163
164
 
164
- def extract_name(args, options)
165
- value = args[1] || options.delete(:name)
166
- case value
167
- when String then value
168
- when nil then raise ArgumentError, "missing required option :name"
169
- else
170
- msg = "expected :name to be a String, got #{value.class}"
171
- raise ArgumentError, msg
172
- end
165
+ def extract_name(args, options)
166
+ value = args[1] || options.delete(:name)
167
+ case value
168
+ when String then value
169
+ when nil then raise ArgumentError, "missing required option :name"
170
+ else
171
+ msg = "expected :name to be a String, got #{value.class}"
172
+ raise ArgumentError, msg
173
173
  end
174
-
175
- class Collection < Aws::Resources::Collection; end
176
174
  end
175
+
176
+ class Collection < Aws::Resources::Collection; end
177
177
  end
178
178
  end
@@ -1,264 +1,264 @@
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 IAM
10
- class InstanceProfile
8
+ module Aws::IAM
9
+ class InstanceProfile
11
10
 
12
- extend Aws::Deprecations
11
+ extend Aws::Deprecations
13
12
 
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
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 :instance_profile_name :name
28
+ # @return [String]
29
+ def name
30
+ @name
31
+ end
32
+ alias :instance_profile_name :name
34
33
 
35
- # The path to the instance profile. For more information about paths,
36
- # see [IAM Identifiers][1] in the *Using IAM* guide.
37
- #
38
- #
39
- #
40
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
41
- # @return [String]
42
- def path
43
- data.path
44
- end
34
+ # The path to the instance profile. For more information about paths,
35
+ # see [IAM Identifiers][1] in the *Using IAM* guide.
36
+ #
37
+ #
38
+ #
39
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
40
+ # @return [String]
41
+ def path
42
+ data.path
43
+ end
45
44
 
46
- # The stable and unique string identifying the instance profile. For
47
- # more information about IDs, see [IAM Identifiers][1] in the *Using
48
- # IAM* guide.
49
- #
50
- #
51
- #
52
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
53
- # @return [String]
54
- def instance_profile_id
55
- data.instance_profile_id
56
- end
45
+ # The stable and unique string identifying the instance profile. For
46
+ # more information about IDs, see [IAM Identifiers][1] in the *Using
47
+ # IAM* guide.
48
+ #
49
+ #
50
+ #
51
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
52
+ # @return [String]
53
+ def instance_profile_id
54
+ data.instance_profile_id
55
+ end
57
56
 
58
- # The Amazon Resource Name (ARN) specifying the instance profile. For
59
- # more information about ARNs and how to use them in policies, see [IAM
60
- # Identifiers][1] in the *Using IAM* guide.
61
- #
62
- #
63
- #
64
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
65
- # @return [String]
66
- def arn
67
- data.arn
68
- end
57
+ # The Amazon Resource Name (ARN) specifying the instance profile. For
58
+ # more information about ARNs and how to use them in policies, see [IAM
59
+ # Identifiers][1] in the *Using IAM* guide.
60
+ #
61
+ #
62
+ #
63
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
64
+ # @return [String]
65
+ def arn
66
+ data.arn
67
+ end
69
68
 
70
- # The date when the instance profile was created.
71
- # @return [Time]
72
- def create_date
73
- data.create_date
74
- end
69
+ # The date when the instance profile was created.
70
+ # @return [Time]
71
+ def create_date
72
+ data.create_date
73
+ end
75
74
 
76
- # @!endgroup
75
+ # @!endgroup
77
76
 
78
- # @return [Client]
79
- def client
80
- @client
81
- end
77
+ # @return [Client]
78
+ def client
79
+ @client
80
+ end
82
81
 
83
- # Loads, or reloads {#data} for the current {InstanceProfile}.
84
- # Returns `self` making it possible to chain methods.
85
- #
86
- # instance_profile.reload.data
87
- #
88
- # @return [self]
89
- def load
90
- resp = @client.get_instance_profile(instance_profile_name: @name)
91
- @data = resp.instanceprofile
92
- self
93
- end
94
- alias :reload :load
82
+ # Loads, or reloads {#data} for the current {InstanceProfile}.
83
+ # Returns `self` making it possible to chain methods.
84
+ #
85
+ # instance_profile.reload.data
86
+ #
87
+ # @return [self]
88
+ def load
89
+ resp = @client.get_instance_profile(instance_profile_name: @name)
90
+ @data = resp.instanceprofile
91
+ self
92
+ end
93
+ alias :reload :load
95
94
 
96
- # @return [Types::InstanceProfile]
97
- # Returns the data for this {InstanceProfile}. Calls
98
- # {Client#get_instance_profile} if {#data_loaded?} is `false`.
99
- def data
100
- load unless @data
101
- @data
102
- end
95
+ # @return [Types::InstanceProfile]
96
+ # Returns the data for this {InstanceProfile}. Calls
97
+ # {Client#get_instance_profile} if {#data_loaded?} is `false`.
98
+ def data
99
+ load unless @data
100
+ @data
101
+ end
103
102
 
104
- # @return [Boolean]
105
- # Returns `true` if this resource is loaded. Accessing attributes or
106
- # {#data} on an unloaded resource will trigger a call to {#load}.
107
- def data_loaded?
108
- !!@data
109
- end
103
+ # @return [Boolean]
104
+ # Returns `true` if this resource is loaded. Accessing attributes or
105
+ # {#data} on an unloaded resource will trigger a call to {#load}.
106
+ def data_loaded?
107
+ !!@data
108
+ end
110
109
 
111
- # @param [Hash] options ({})
112
- # @return [Boolean]
113
- # Returns `true` if the InstanceProfile exists.
114
- def exists?(options = {})
115
- begin
116
- wait_until_exists(options.merge(max_attempts: 1))
117
- true
118
- rescue Aws::Waiters::Errors::UnexpectedError => e
119
- raise e.error
120
- rescue Aws::Waiters::Errors::WaiterFailed
121
- false
122
- end
110
+ # @param [Hash] options ({})
111
+ # @return [Boolean]
112
+ # Returns `true` if the InstanceProfile exists.
113
+ def exists?(options = {})
114
+ begin
115
+ wait_until_exists(options.merge(max_attempts: 1))
116
+ true
117
+ rescue Aws::Waiters::Errors::UnexpectedError => e
118
+ raise e.error
119
+ rescue Aws::Waiters::Errors::WaiterFailed
120
+ false
123
121
  end
122
+ end
124
123
 
125
- # @param [Hash] options ({})
126
- # @option options [Integer] :max_attempts (40)
127
- # @option options [Float] :delay (1)
128
- # @option options [Proc] :before_attempt
129
- # @option options [Proc] :before_wait
130
- # @return [InstanceProfile]
131
- def wait_until_exists(options = {})
132
- options, params = separate_params_and_options(options)
133
- waiter = Waiters::InstanceProfileExists.new(options)
134
- yield_waiter_and_warn(waiter, &Proc.new) if block_given?
135
- waiter.wait(params.merge(instance_profile_name: @name))
136
- InstanceProfile.new({
137
- name: @name,
138
- client: @client
139
- })
140
- end
124
+ # @param [Hash] options ({})
125
+ # @option options [Integer] :max_attempts (40)
126
+ # @option options [Float] :delay (1)
127
+ # @option options [Proc] :before_attempt
128
+ # @option options [Proc] :before_wait
129
+ # @return [InstanceProfile]
130
+ def wait_until_exists(options = {})
131
+ options, params = separate_params_and_options(options)
132
+ waiter = Waiters::InstanceProfileExists.new(options)
133
+ yield_waiter_and_warn(waiter, &Proc.new) if block_given?
134
+ waiter.wait(params.merge(instance_profile_name: @name))
135
+ InstanceProfile.new({
136
+ name: @name,
137
+ client: @client
138
+ })
139
+ end
141
140
 
142
- # @!group Actions
141
+ # @!group Actions
143
142
 
144
- # @example Request syntax with placeholder values
145
- #
146
- # instance_profile.add_role({
147
- # role_name: "roleNameType", # required
148
- # })
149
- # @param [Hash] options ({})
150
- # @option options [required, String] :role_name
151
- # The name of the role to add.
152
- #
153
- # The [regex pattern][1] for this parameter is a string of characters
154
- # consisting of upper and lowercase alphanumeric characters with no
155
- # spaces. You can also include any of the following characters: =,.@-
156
- #
157
- #
158
- #
159
- # [1]: http://wikipedia.org/wiki/regex
160
- # @return [EmptyStructure]
161
- def add_role(options = {})
162
- options = options.merge(instance_profile_name: @name)
163
- resp = @client.add_role_to_instance_profile(options)
164
- resp.data
165
- end
143
+ # @example Request syntax with placeholder values
144
+ #
145
+ # instance_profile.add_role({
146
+ # role_name: "roleNameType", # required
147
+ # })
148
+ # @param [Hash] options ({})
149
+ # @option options [required, String] :role_name
150
+ # The name of the role to add.
151
+ #
152
+ # This parameter allows (per its [regex pattern][1]) a string of
153
+ # characters consisting of upper and lowercase alphanumeric characters
154
+ # with no spaces. You can also include any of the following characters:
155
+ # =,.@-
156
+ #
157
+ #
158
+ #
159
+ # [1]: http://wikipedia.org/wiki/regex
160
+ # @return [EmptyStructure]
161
+ def add_role(options = {})
162
+ options = options.merge(instance_profile_name: @name)
163
+ resp = @client.add_role_to_instance_profile(options)
164
+ resp.data
165
+ end
166
166
 
167
- # @example Request syntax with placeholder values
168
- #
169
- # instance_profile.delete()
170
- # @param [Hash] options ({})
171
- # @return [EmptyStructure]
172
- def delete(options = {})
173
- options = options.merge(instance_profile_name: @name)
174
- resp = @client.delete_instance_profile(options)
175
- resp.data
176
- end
167
+ # @example Request syntax with placeholder values
168
+ #
169
+ # instance_profile.delete()
170
+ # @param [Hash] options ({})
171
+ # @return [EmptyStructure]
172
+ def delete(options = {})
173
+ options = options.merge(instance_profile_name: @name)
174
+ resp = @client.delete_instance_profile(options)
175
+ resp.data
176
+ end
177
177
 
178
- # @example Request syntax with placeholder values
179
- #
180
- # instance_profile.remove_role({
181
- # role_name: "roleNameType", # required
182
- # })
183
- # @param [Hash] options ({})
184
- # @option options [required, String] :role_name
185
- # The name of the role to remove.
186
- #
187
- # The [regex pattern][1] for this parameter is a string of characters
188
- # consisting of upper and lowercase alphanumeric characters with no
189
- # spaces. You can also include any of the following characters: =,.@-
190
- #
191
- #
192
- #
193
- # [1]: http://wikipedia.org/wiki/regex
194
- # @return [EmptyStructure]
195
- def remove_role(options = {})
196
- options = options.merge(instance_profile_name: @name)
197
- resp = @client.remove_role_from_instance_profile(options)
198
- resp.data
199
- end
178
+ # @example Request syntax with placeholder values
179
+ #
180
+ # instance_profile.remove_role({
181
+ # role_name: "roleNameType", # required
182
+ # })
183
+ # @param [Hash] options ({})
184
+ # @option options [required, String] :role_name
185
+ # The name of the role to remove.
186
+ #
187
+ # This parameter allows (per its [regex pattern][1]) a string of
188
+ # characters consisting of upper and lowercase alphanumeric characters
189
+ # with no spaces. You can also include any of the following characters:
190
+ # =,.@-
191
+ #
192
+ #
193
+ #
194
+ # [1]: http://wikipedia.org/wiki/regex
195
+ # @return [EmptyStructure]
196
+ def remove_role(options = {})
197
+ options = options.merge(instance_profile_name: @name)
198
+ resp = @client.remove_role_from_instance_profile(options)
199
+ resp.data
200
+ end
200
201
 
201
- # @!group Associations
202
+ # @!group Associations
202
203
 
203
- # @return [Role::Collection]
204
- def roles
205
- batch = []
206
- data.roles.each do |r|
207
- batch << Role.new(
208
- name: r.role_name,
209
- data: r,
210
- client: @client
211
- )
212
- end
213
- Role::Collection.new([batch], size: batch.size)
204
+ # @return [Role::Collection]
205
+ def roles
206
+ batch = []
207
+ data.roles.each do |r|
208
+ batch << Role.new(
209
+ name: r.role_name,
210
+ data: r,
211
+ client: @client
212
+ )
214
213
  end
214
+ Role::Collection.new([batch], size: batch.size)
215
+ end
215
216
 
216
- # @deprecated
217
- # @api private
218
- def identifiers
219
- { name: @name }
220
- end
221
- deprecated(:identifiers)
217
+ # @deprecated
218
+ # @api private
219
+ def identifiers
220
+ { name: @name }
221
+ end
222
+ deprecated(:identifiers)
222
223
 
223
- private
224
+ private
224
225
 
225
- def extract_name(args, options)
226
- value = args[0] || options.delete(:name)
227
- case value
228
- when String then value
229
- when nil then raise ArgumentError, "missing required option :name"
230
- else
231
- msg = "expected :name to be a String, got #{value.class}"
232
- raise ArgumentError, msg
233
- end
226
+ def extract_name(args, options)
227
+ value = args[0] || options.delete(:name)
228
+ case value
229
+ when String then value
230
+ when nil then raise ArgumentError, "missing required option :name"
231
+ else
232
+ msg = "expected :name to be a String, got #{value.class}"
233
+ raise ArgumentError, msg
234
234
  end
235
+ end
235
236
 
236
- def yield_waiter_and_warn(waiter, &block)
237
- if !@waiter_block_warned
238
- msg = "pass options to configure the waiter; "
239
- msg << "yielding the waiter is deprecated"
240
- warn(msg)
241
- @waiter_block_warned = true
242
- end
243
- yield(waiter.waiter)
237
+ def yield_waiter_and_warn(waiter, &block)
238
+ if !@waiter_block_warned
239
+ msg = "pass options to configure the waiter; "
240
+ msg << "yielding the waiter is deprecated"
241
+ warn(msg)
242
+ @waiter_block_warned = true
244
243
  end
244
+ yield(waiter.waiter)
245
+ end
245
246
 
246
- def separate_params_and_options(options)
247
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
248
- waiter_opts = {}
249
- waiter_params = {}
250
- options.each_pair do |key, value|
251
- if opts.include?(key)
252
- waiter_opts[key] = value
253
- else
254
- waiter_params[key] = value
255
- end
247
+ def separate_params_and_options(options)
248
+ opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
249
+ waiter_opts = {}
250
+ waiter_params = {}
251
+ options.each_pair do |key, value|
252
+ if opts.include?(key)
253
+ waiter_opts[key] = value
254
+ else
255
+ waiter_params[key] = value
256
256
  end
257
- waiter_opts[:client] ||= @client
258
- [waiter_opts, waiter_params]
259
257
  end
260
-
261
- class Collection < Aws::Resources::Collection; end
258
+ waiter_opts[:client] ||= @client
259
+ [waiter_opts, waiter_params]
262
260
  end
261
+
262
+ class Collection < Aws::Resources::Collection; end
263
263
  end
264
264
  end