class Aws::Resources::Operations::WaiterOperation
Attributes
path[R]
@return [String<JMESPathExpression>, nil]
waiter_name[R]
@return [Symbol]
waiter_params[R]
@return [Array<RequestParams::Base>]
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
Aws::Resources::Operations::Base::new
# File lib/aws-sdk-resources/operations.rb, line 202 def initialize(options = {}) @waiter_name = option(:waiter_name, options) @waiter_params = option(:waiter_params, options) @path = options[:path] super end
Public Instance Methods
call(options)
click to toggle source
@option options [required,Resource] :resource @option options [required,Array<Mixed>] :args
# File lib/aws-sdk-resources/operations.rb, line 220 def call(options) resource = options[:resource] params_hash = {} @waiter_params.each do |param| param.apply(params_hash, options) end resp = resource.client.wait_until(@waiter_name, params_hash, &options[: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