Class: Aws::EventBridgeV2::Waiters::EventBusDeleted

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

Overview

Waits until the event bus is fully deleted, signaled by DescribeEventBus returning ResourceNotFoundException. Use after DeleteEventBus. Fails fast on the terminal DELETE_FAILED state, surfacing StateReason; retry DeleteEventBus after removing subscribers.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ EventBusDeleted

Returns a new instance of EventBusDeleted.

Parameters:

  • options (Hash)

Options Hash (options):

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


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

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 60,
    delay: 2,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_event_bus,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "state",
          "state" => "failure",
          "expected" => "DELETE_FAILED"
        },
        {
          "matcher" => "error",
          "state" => "success",
          "expected" => "ResourceNotFoundException"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

Returns:



169
170
171
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/waiters.rb', line 169

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