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

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

Overview

Wait until report generation succeeds

Instance Attribute Summary collapse

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 '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 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.



177
178
179
# File 'lib/aws-sdk-resiliencehubv2/waiters.rb', line 177

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

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 'lib/aws-sdk-resiliencehubv2/waiters.rb', line 172

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