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

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

Overview

Wait until a run is completed.

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 'gems/aws-sdk-omics/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 Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :id (required, String)

    The run's ID.

  • :export (Array<String>)

    The run's export format.

Returns:



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

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