Class: Aws::Resiliencehubv2::Waiters::ReportSucceeded

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

Overview

Wait until report generation succeeds

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ReportSucceeded

Returns a new instance of ReportSucceeded.

Parameters:

  • options (Hash)

Options Hash (options):

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


139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'gems/aws-sdk-resiliencehubv2/lib/aws-sdk-resiliencehubv2/waiters.rb', line 139

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 5,
    delay: 30,
    poller: Aws::Waiters::Poller.new(
      operation_name: :list_reports,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "length(report_generation_results[]) == `0`",
          "state" => "retry",
          "expected" => true
        },
        {
          "matcher" => "pathAll",
          "argument" => "report_generation_results[].status",
          "state" => "success",
          "expected" => "SUCCEEDED"
        },
        {
          "matcher" => "pathAny",
          "argument" => "report_generation_results[].status",
          "state" => "failure",
          "expected" => "FAILED"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :service_arn (String)

    Optional. If not provided, lists all reports owned by the account.

  • :report_type (String)

    Filter reports by type.

  • :max_results (Integer)

    Pagination page size.

  • :next_token (String)

    Pagination token.

Returns:



172
173
174
# File 'gems/aws-sdk-resiliencehubv2/lib/aws-sdk-resiliencehubv2/waiters.rb', line 172

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