Class: Aws::LexModelsV2::Waiters::BotLocaleCreated

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

Overview

Wait unit a bot locale is created

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ BotLocaleCreated

Returns a new instance of BotLocaleCreated.

Parameters:

  • options (Hash)

Options Hash (options):

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


359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# File 'lib/aws-sdk-lexmodelsv2/waiters.rb', line 359

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" => "ReadyExpressTesting",
          "matcher" => "path",
          "state" => "success",
          "argument" => "bot_locale_status"
        },
        {
          "expected" => "NotBuilt",
          "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"
        }
      ]
    )
  }.merge(options))
end

Instance Attribute Details

#waiterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



409
410
411
# File 'lib/aws-sdk-lexmodelsv2/waiters.rb', line 409

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

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].

    [1]: docs.aws.amazon.com/lexv2/latest/dg/how-languages.html

Returns:



404
405
406
# File 'lib/aws-sdk-lexmodelsv2/waiters.rb', line 404

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