Class: Aws::EventBridgeV2::Waiters::MskSubscriberActive

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

Overview

Waits until an Amazon MSK subscriber's connectivity reports ACTIVE. Use after CreateSubscriber or UpdateSubscriber on a subscriber that targets an MSK cluster. Fails fast on PROVISION_FAILED, surfacing MskDetails.StateReason. PROVISIONING falls through to the implicit retry. Applies only to MSK subscribers; other subscribers return no MskDetails, so the waiter times out.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ MskSubscriberActive

Returns a new instance of MskSubscriberActive.

Parameters:

  • options (Hash)

Options Hash (options):

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


188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/waiters.rb', line 188

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 150,
    delay: 2,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_subscriber,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "subscriber_details.msk_details.connectivity_state",
          "state" => "failure",
          "expected" => "PROVISION_FAILED"
        },
        {
          "matcher" => "path",
          "argument" => "subscriber_details.msk_details.connectivity_state",
          "state" => "success",
          "expected" => "ACTIVE"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :subscriber_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies a subscriber.

Returns:



215
216
217
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/waiters.rb', line 215

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