Class: Aws::Inspector2::Waiters::ConnectorEnabled

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

Overview

Wait until a connector reaches the ENABLED state, whether after CreateConnector or UpdateConnector. Caller MUST filter ListConnectors by the specific connector ARN so the matchers apply only to the target connector. Success when all returned items have enablementStatus == ENABLED. Failure when any item is in FAILED_TO_ENABLE or FAILED_TO_UPDATE.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ConnectorEnabled

Returns a new instance of ConnectorEnabled.

Parameters:

  • options (Hash)

Options Hash (options):

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


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

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" => "pathAll",
          "argument" => "items[].enablement_status",
          "state" => "success",
          "expected" => "ENABLED"
        },
        {
          "matcher" => "pathAny",
          "argument" => "items[].enablement_status",
          "state" => "failure",
          "expected" => "FAILED_TO_ENABLE"
        },
        {
          "matcher" => "pathAny",
          "argument" => "items[].enablement_status",
          "state" => "failure",
          "expected" => "FAILED_TO_UPDATE"
        }
      ]
    )
  }.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:



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

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