Class: Aws::Omics::Waiters::RunCompleted

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

Overview

Wait until a run is completed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ RunCompleted

Returns a new instance of RunCompleted.

Parameters:

  • options (Hash)

Options Hash (options):

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


678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/aws-sdk-omics/waiters.rb', line 678

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 20,
    delay: 30,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_run,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "success",
          "expected" => "COMPLETED"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "PENDING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "STARTING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "RUNNING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "STOPPING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "FAILED"
        }
      ]
    )
  }.merge(options))
end

Instance Attribute Details

#waiterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



734
735
736
# File 'lib/aws-sdk-omics/waiters.rb', line 734

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :id (required, String)

    The run’s ID.

  • :export (Array<String>)

    The run’s export format.

Returns:



729
730
731
# File 'lib/aws-sdk-omics/waiters.rb', line 729

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