Class: Aws::LexModelsV2::Waiters::BotLocaleBuilt

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

Overview

Wait until a bot locale is built

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ BotLocaleBuilt

Returns a new instance of BotLocaleBuilt.

Parameters:

  • options (Hash)

Options Hash (options):

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


302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/waiters.rb', line 302

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 35,
    delay: 10,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_bot_locale,
      acceptors: [
        {
          "expected" => "Built",
          "matcher" => "path",
          "state" => "success",
          "argument" => "bot_locale_status"
        },
        {
          "expected" => "Deleting",
          "matcher" => "path",
          "state" => "failure",
          "argument" => "bot_locale_status"
        },
        {
          "expected" => "Failed",
          "matcher" => "path",
          "state" => "failure",
          "argument" => "bot_locale_status"
        },
        {
          "expected" => "NotBuilt",
          "matcher" => "path",
          "state" => "failure",
          "argument" => "bot_locale_status"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot associated with the locale.

  • :bot_version (required, String)

    The version of the bot associated with the locale.

  • :locale_id (required, String)

    The unique identifier of the locale to describe. The string must match one of the supported locales. For more information, see Supported languages.

Returns:



341
342
343
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/waiters.rb', line 341

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