Class: Aws::Inspector2::Waiters::ConnectorDeleted

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

Overview

Wait until a connector is no longer returned by ListConnectors. Caller MUST filter ListConnectors by the specific connector ARN; success is reached when the filtered result returns zero items. Failure when the deletion terminally fails (FAILED_TO_DELETE).

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ConnectorDeleted

Returns a new instance of ConnectorDeleted.

Parameters:

  • options (Hash)

Options Hash (options):

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


138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/waiters.rb', line 138

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_connectors,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "length(items) == `0`",
          "state" => "success",
          "expected" => true
        },
        {
          "matcher" => "pathAny",
          "argument" => "items[].enablement_status",
          "state" => "failure",
          "expected" => "FAILED_TO_DELETE"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the nextToken value returned from this request.

  • :next_token (String)

    A token to use for paginating results. Set this value to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

  • :filter_criteria (Types::ConnectorFilterCriteria)

    The filter criteria to apply to the list of connectors.

Returns:



165
166
167
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/waiters.rb', line 165

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