Class: Aws::Resources::Operations::WaiterOperation
- Includes:
- Aws::Resources::Options
- Defined in:
- lib/aws-sdk-resources/operations.rb
Instance Attribute Summary collapse
- #path ⇒ String<JMESPathExpression>? readonly
- #waiter_name ⇒ Symbol readonly
- #waiter_params ⇒ Array<RequestParams::Base> readonly
Attributes inherited from Base
Instance Method Summary collapse
- #call(options) ⇒ Object
-
#initialize(options = {}) ⇒ WaiterOperation
constructor
A new instance of WaiterOperation.
Constructor Details
#initialize(options = {}) ⇒ WaiterOperation
Returns a new instance of WaiterOperation.
202 203 204 205 206 207 |
# File 'lib/aws-sdk-resources/operations.rb', line 202 def initialize( = {}) @waiter_name = option(:waiter_name, ) @waiter_params = option(:waiter_params, ) @path = [:path] super end |
Instance Attribute Details
#path ⇒ String<JMESPathExpression>? (readonly)
216 217 218 |
# File 'lib/aws-sdk-resources/operations.rb', line 216 def path @path end |
#waiter_name ⇒ Symbol (readonly)
210 211 212 |
# File 'lib/aws-sdk-resources/operations.rb', line 210 def waiter_name @waiter_name end |
#waiter_params ⇒ Array<RequestParams::Base> (readonly)
213 214 215 |
# File 'lib/aws-sdk-resources/operations.rb', line 213 def waiter_params @waiter_params end |
Instance Method Details
#call(options) ⇒ Object
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/aws-sdk-resources/operations.rb', line 220 def call() resource = [:resource] params_hash = [:args].first || {} @waiter_params.each do |param| param.apply(params_hash, ) end resp = resource.client.wait_until(@waiter_name, params_hash, &[:block]) resource_opts = resource.identifiers.dup if @path && resp.respond_to?(:data) resource_opts[:data] = JMESPath.search(@path, resp.data) end resource_opts[:client] = resource.client resource.class.new(resource_opts) end |