Class: Aws::NeptuneGraph::Waiters::ImportTaskCancelled

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/waiters.rb

Overview

Wait until Import Task is Cancelled

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ImportTaskCancelled

Returns a new instance of ImportTaskCancelled.

Parameters:

  • options (Hash)

Options Hash (options):

  • :client (required, Client)
  • :max_attempts (Integer) — default: 60
  • :delay (Integer) — default: 60
  • :before_attempt (Proc)
  • :before_wait (Proc)


282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/waiters.rb', line 282

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 60,
    delay: 60,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_import_task,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "status != 'CANCELLING' && status != 'CANCELLED'",
          "state" => "failure",
          "expected" => true
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "success",
          "expected" => "CANCELLED"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

#wait(params = {}) ⇒ Types::GetImportTaskOutput

Returns a response object which responds to the following methods:

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :task_identifier (required, String)

    The unique identifier of the import task.

Returns:



309
310
311
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/waiters.rb', line 309

def wait(params = {})
  @waiter.wait(client: @client, params: params)
end