Class: Aws::LexModelsV2::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb

Overview

An API client for LexModelsV2. To construct a client, you need to configure a :region and :credentials.

client = Aws::LexModelsV2::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



326
327
328
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 326

def initialize(*args)
  super
end

Instance Method Details

#build_bot_locale(params = {}) ⇒ Types::BuildBotLocaleResponse

Builds a bot, its intents, and its slot types into a specific locale. A bot can be built into multiple locales. At runtime the locale is used to choose a specific build of the bot.

Examples:

Request syntax with placeholder values


resp = client.build_bot_locale({
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.bot_locale_status #=> String, one of "Creating", "Building", "Built", "ReadyExpressTesting", "Failed", "Deleting", "NotBuilt", "Importing"
resp. #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot to build. The identifier is returned in the response from the operation.

  • :bot_version (required, String)

    The version of the bot to build. This can only be the draft version of the bot.

  • :locale_id (required, String)

    The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.

Returns:

See Also:



382
383
384
385
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 382

def build_bot_locale(params = {}, options = {})
  req = build_request(:build_bot_locale, params)
  req.send_request(options)
end

#create_bot(params = {}) ⇒ Types::CreateBotResponse

Creates an Amazon Lex conversational bot.

Examples:

Request syntax with placeholder values


resp = client.create_bot({
  bot_name: "Name", # required
  description: "Description",
  role_arn: "RoleArn", # required
  data_privacy: { # required
    child_directed: false, # required
  },
  idle_session_ttl_in_seconds: 1, # required
  bot_tags: {
    "TagKey" => "TagValue",
  },
  test_bot_alias_tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.bot_id #=> String
resp.bot_name #=> String
resp.description #=> String
resp.role_arn #=> String
resp.data_privacy.child_directed #=> Boolean
resp.idle_session_ttl_in_seconds #=> Integer
resp.bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"
resp.creation_date_time #=> Time
resp.bot_tags #=> Hash
resp.bot_tags["TagKey"] #=> String
resp.test_bot_alias_tags #=> Hash
resp.test_bot_alias_tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_name (required, String)

    The name of the bot. The bot name must be unique in the account that creates the bot.

  • :description (String)

    A description of the bot. It appears in lists to help you identify a particular bot.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.

  • :data_privacy (required, Types::DataPrivacy)

    Provides information on additional privacy protections Amazon Lex should use with the bot's data.

  • :idle_session_ttl_in_seconds (required, Integer)

    The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.

    A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.

    You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.

  • :bot_tags (Hash<String,String>)

    A list of tags to add to the bot. You can only add tags when you create a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.

  • :test_bot_alias_tags (Hash<String,String>)

    A list of tags to add to the test alias for a bot. You can only add tags when you create a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.

Returns:

See Also:



476
477
478
479
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 476

def create_bot(params = {}, options = {})
  req = build_request(:create_bot, params)
  req.send_request(options)
end

#create_bot_alias(params = {}) ⇒ Types::CreateBotAliasResponse

Creates an alias for the specified version of a bot. Use an alias to enable you to change the version of a bot without updating applications that use the bot.

For example, you can create an alias called "PROD" that your applications use to call the Amazon Lex bot.

Examples:

Request syntax with placeholder values


resp = client.create_bot_alias({
  bot_alias_name: "Name", # required
  description: "Description",
  bot_version: "NumericalBotVersion",
  bot_alias_locale_settings: {
    "LocaleId" => {
      enabled: false, # required
      code_hook_specification: {
        lambda_code_hook: { # required
          lambda_arn: "LambdaARN", # required
          code_hook_interface_version: "CodeHookInterfaceVersion", # required
        },
      },
    },
  },
  conversation_log_settings: {
    text_log_settings: [
      {
        enabled: false, # required
        destination: { # required
          cloud_watch: { # required
            cloud_watch_log_group_arn: "CloudWatchLogGroupArn", # required
            log_prefix: "LogPrefix", # required
          },
        },
      },
    ],
    audio_log_settings: [
      {
        enabled: false, # required
        destination: { # required
          s3_bucket: { # required
            kms_key_arn: "KmsKeyArn",
            s3_bucket_arn: "S3BucketArn", # required
            log_prefix: "LogPrefix", # required
          },
        },
      },
    ],
  },
  sentiment_analysis_settings: {
    detect_sentiment: false, # required
  },
  bot_id: "Id", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.bot_alias_id #=> String
resp.bot_alias_name #=> String
resp.description #=> String
resp.bot_version #=> String
resp.bot_alias_locale_settings #=> Hash
resp.bot_alias_locale_settings["LocaleId"].enabled #=> Boolean
resp.bot_alias_locale_settings["LocaleId"].code_hook_specification.lambda_code_hook.lambda_arn #=> String
resp.bot_alias_locale_settings["LocaleId"].code_hook_specification.lambda_code_hook.code_hook_interface_version #=> String
resp.conversation_log_settings.text_log_settings #=> Array
resp.conversation_log_settings.text_log_settings[0].enabled #=> Boolean
resp.conversation_log_settings.text_log_settings[0].destination.cloud_watch.cloud_watch_log_group_arn #=> String
resp.conversation_log_settings.text_log_settings[0].destination.cloud_watch.log_prefix #=> String
resp.conversation_log_settings.audio_log_settings #=> Array
resp.conversation_log_settings.audio_log_settings[0].enabled #=> Boolean
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.kms_key_arn #=> String
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.s3_bucket_arn #=> String
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.log_prefix #=> String
resp.sentiment_analysis_settings.detect_sentiment #=> Boolean
resp.bot_alias_status #=> String, one of "Creating", "Available", "Deleting", "Failed"
resp.bot_id #=> String
resp.creation_date_time #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_alias_name (required, String)

    The alias to create. The name must be unique for the bot.

  • :description (String)

    A description of the alias. Use this description to help identify the alias.

  • :bot_version (String)

    The version of the bot that this alias points to. You can use the operation to change the bot version associated with the alias.

  • :bot_alias_locale_settings (Hash<String,Types::BotAliasLocaleSettings>)

    Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda function to run different functions in different locales.

  • :conversation_log_settings (Types::ConversationLogSettings)

    Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. Audio logs store audio input in Amazon S3.

  • :sentiment_analysis_settings (Types::SentimentAnalysisSettings)

    Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

  • :bot_id (required, String)

    The unique identifier of the bot that the alias applies to.

  • :tags (Hash<String,String>)

    A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the TagResource operation.

Returns:

See Also:



618
619
620
621
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 618

def create_bot_alias(params = {}, options = {})
  req = build_request(:create_bot_alias, params)
  req.send_request(options)
end

#create_bot_locale(params = {}) ⇒ Types::CreateBotLocaleResponse

Creates a locale in the bot. The locale contains the intents and slot types that the bot uses in conversations with users in the specified language and locale. You must add a locale to a bot before you can add intents and slot types to the bot.

Examples:

Request syntax with placeholder values


resp = client.create_bot_locale({
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
  description: "Description",
  nlu_intent_confidence_threshold: 1.0, # required
  voice_settings: {
    voice_id: "VoiceId", # required
  },
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_name #=> String
resp.locale_id #=> String
resp.description #=> String
resp.nlu_intent_confidence_threshold #=> Float
resp.voice_settings.voice_id #=> String
resp.bot_locale_status #=> String, one of "Creating", "Building", "Built", "ReadyExpressTesting", "Failed", "Deleting", "NotBuilt", "Importing"
resp.creation_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot to create the locale for.

  • :bot_version (required, String)

    The version of the bot to create the locale for. This can only be the draft version of the bot.

  • :locale_id (required, String)

    The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.

  • :description (String)

    A description of the bot locale. Use this to help identify the bot locale in lists.

  • :nlu_intent_confidence_threshold (required, Float)

    Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.

    For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:

    • AMAZON.FallbackIntent

    • IntentA

    • IntentB

    • IntentC

  • :voice_settings (Types::VoiceSettings)

    The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.

Returns:

See Also:



715
716
717
718
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 715

def create_bot_locale(params = {}, options = {})
  req = build_request(:create_bot_locale, params)
  req.send_request(options)
end

#create_bot_version(params = {}) ⇒ Types::CreateBotVersionResponse

Creates a new version of the bot based on the DRAFT version. If the DRAFT version of this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version, it returns the last created version.

When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1.

Examples:

Request syntax with placeholder values


resp = client.create_bot_version({
  bot_id: "Id", # required
  description: "Description",
  bot_version_locale_specification: { # required
    "LocaleId" => {
      source_bot_version: "BotVersion", # required
    },
  },
})

Response structure


resp.bot_id #=> String
resp.description #=> String
resp.bot_version #=> String
resp.bot_version_locale_specification #=> Hash
resp.bot_version_locale_specification["LocaleId"].source_bot_version #=> String
resp.bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"
resp.creation_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot to create the version for.

  • :description (String)

    A description of the version. Use the description to help identify the version in lists.

  • :bot_version_locale_specification (required, Hash<String,Types::BotVersionLocaleDetails>)

    Specifies the locales that Amazon Lex adds to this version. You can choose the Draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

Returns:

See Also:



776
777
778
779
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 776

def create_bot_version(params = {}, options = {})
  req = build_request(:create_bot_version, params)
  req.send_request(options)
end

#create_export(params = {}) ⇒ Types::CreateExportResponse

Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot.

You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale.

For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots

Examples:

Request syntax with placeholder values


resp = client.create_export({
  resource_specification: { # required
    bot_export_specification: {
      bot_id: "Id", # required
      bot_version: "BotVersion", # required
    },
    bot_locale_export_specification: {
      bot_id: "Id", # required
      bot_version: "BotVersion", # required
      locale_id: "LocaleId", # required
    },
  },
  file_format: "LexJson", # required, accepts LexJson
  file_password: "ImportExportFilePassword",
})

Response structure


resp.export_id #=> String
resp.resource_specification.bot_export_specification.bot_id #=> String
resp.resource_specification.bot_export_specification.bot_version #=> String
resp.resource_specification.bot_locale_export_specification.bot_id #=> String
resp.resource_specification.bot_locale_export_specification.bot_version #=> String
resp.resource_specification.bot_locale_export_specification.locale_id #=> String
resp.file_format #=> String, one of "LexJson"
resp.export_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"
resp.creation_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :resource_specification (required, Types::ExportResourceSpecification)

    Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.

  • :file_format (required, String)

    The file format of the bot or bot locale definition files.

  • :file_password (String)

    An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.

Returns:

See Also:



850
851
852
853
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 850

def create_export(params = {}, options = {})
  req = build_request(:create_export, params)
  req.send_request(options)
end

#create_intent(params = {}) ⇒ Types::CreateIntentResponse

Creates an intent.

To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza ordering bot you would create an OrderPizza intent.

When you create an intent, you must provide a name. You can optionally provide the following:

  • Sample utterances. For example, "I want to order a pizza" and "Can I order a pizza." You can't provide utterances for built-in intents.

  • Information to be gathered. You specify slots for the information that you bot requests from the user. You can specify standard slot types, such as date and time, or custom slot types for your application.

  • How the intent is fulfilled. You can provide a Lambda function or configure the intent to return the intent information to your client application. If you use a Lambda function, Amazon Lex invokes the function when all of the intent information is available.

  • A confirmation prompt to send to the user to confirm an intent. For example, "Shall I order your pizza?"

  • A conclusion statement to send to the user after the intent is fulfilled. For example, "I ordered your pizza."

  • A follow-up prompt that asks the user for additional activity. For example, "Do you want a drink with your pizza?"

Examples:

Request syntax with placeholder values


resp = client.create_intent({
  intent_name: "Name", # required
  description: "Description",
  parent_intent_signature: "IntentSignature",
  sample_utterances: [
    {
      utterance: "Utterance", # required
    },
  ],
  dialog_code_hook: {
    enabled: false, # required
  },
  fulfillment_code_hook: {
    enabled: false, # required
  },
  intent_confirmation_setting: {
    prompt_specification: { # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      max_retries: 1, # required
      allow_interrupt: false,
    },
    declination_response: { # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
  },
  intent_closing_setting: {
    closing_response: { # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
  },
  input_contexts: [
    {
      name: "Name", # required
    },
  ],
  output_contexts: [
    {
      name: "Name", # required
      time_to_live_in_seconds: 1, # required
      turns_to_live: 1, # required
    },
  ],
  kendra_configuration: {
    kendra_index: "KendraIndexArn", # required
    query_filter_string_enabled: false,
    query_filter_string: "QueryFilterString",
  },
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.intent_id #=> String
resp.intent_name #=> String
resp.description #=> String
resp.parent_intent_signature #=> String
resp.sample_utterances #=> Array
resp.sample_utterances[0].utterance #=> String
resp.dialog_code_hook.enabled #=> Boolean
resp.fulfillment_code_hook.enabled #=> Boolean
resp.intent_confirmation_setting.prompt_specification.message_groups #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.plain_text_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.custom_payload.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.ssml_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.title #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.subtitle #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.image_url #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].plain_text_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].custom_payload.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].ssml_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.title #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.prompt_specification.max_retries #=> Integer
resp.intent_confirmation_setting.prompt_specification.allow_interrupt #=> Boolean
resp.intent_confirmation_setting.declination_response.message_groups #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].message.plain_text_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.custom_payload.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.ssml_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.title #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.image_url #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.declination_response.allow_interrupt #=> Boolean
resp.intent_closing_setting.closing_response.message_groups #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].message.plain_text_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.custom_payload.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.ssml_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.title #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.image_url #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.intent_closing_setting.closing_response.allow_interrupt #=> Boolean
resp.input_contexts #=> Array
resp.input_contexts[0].name #=> String
resp.output_contexts #=> Array
resp.output_contexts[0].name #=> String
resp.output_contexts[0].time_to_live_in_seconds #=> Integer
resp.output_contexts[0].turns_to_live #=> Integer
resp.kendra_configuration.kendra_index #=> String
resp.kendra_configuration.query_filter_string_enabled #=> Boolean
resp.kendra_configuration.query_filter_string #=> String
resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.creation_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :intent_name (required, String)

    The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.

  • :description (String)

    A description of the intent. Use the description to help identify the intent in lists.

  • :parent_intent_signature (String)

    A unique identifier for the built-in intent to base this intent on.

  • :sample_utterances (Array<Types::SampleUtterance>)

    An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize\} pizza".

    In an utterance, slot names are enclosed in curly braces ("{", "\}") to indicate where they should be displayed in the utterance shown to the user..

  • :dialog_code_hook (Types::DialogCodeHookSettings)

    Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.

    For example, suppose that your bot determines that the user's name is John. You Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, glutenIntolerant to true. You might find John's phone number and set the corresponding session attribute.

  • :fulfillment_code_hook (Types::FulfillmentCodeHookSettings)

    Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.

    For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.

  • :intent_confirmation_setting (Types::IntentConfirmationSetting)

    Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.

  • :intent_closing_setting (Types::IntentClosingSetting)

    Sets the response that Amazon Lex sends to the user when the intent is closed.

  • :input_contexts (Array<Types::InputContext>)

    A list of contexts that must be active for this intent to be considered by Amazon Lex.

    When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.

    A context can be automatically activated using the outputContexts property or it can be set at runtime.

    For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.

    An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.

  • :output_contexts (Array<Types::OutputContext>)

    A lists of contexts that the intent activates when it is fulfilled.

    You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.

    When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.

  • :kendra_configuration (Types::KendraConfiguration)

    Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke.

  • :bot_id (required, String)

    The identifier of the bot associated with this intent.

  • :bot_version (required, String)

    The identifier of the version of the bot associated with this intent.

  • :locale_id (required, String)

    The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see Supported languages.

Returns:

See Also:



1303
1304
1305
1306
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 1303

def create_intent(params = {}, options = {})
  req = build_request(:create_intent, params)
  req.send_request(options)
end

#create_resource_policy(params = {}) ⇒ Types::CreateResourcePolicyResponse

Creates a new resource policy with the specified policy statements.

Examples:

Request syntax with placeholder values


resp = client.create_resource_policy({
  resource_arn: "AmazonResourceName", # required
  policy: "Policy", # required
})

Response structure


resp.resource_arn #=> String
resp.revision_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

  • :policy (required, String)

    A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see IAM JSON policy reference .

    If the policy isn't valid, Amazon Lex returns a validation exception.

Returns:

See Also:



1348
1349
1350
1351
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 1348

def create_resource_policy(params = {}, options = {})
  req = build_request(:create_resource_policy, params)
  req.send_request(options)
end

#create_resource_policy_statement(params = {}) ⇒ Types::CreateResourcePolicyStatementResponse

Adds a new resource policy statement to a bot or bot alias. If a resource policy exists, the statement is added to the current resource policy. If a policy doesn't exist, a new policy is created.

You can't create a resource policy statement that allows cross-account access.

Examples:

Request syntax with placeholder values


resp = client.create_resource_policy_statement({
  resource_arn: "AmazonResourceName", # required
  statement_id: "Name", # required
  effect: "Allow", # required, accepts Allow, Deny
  principal: [ # required
    {
      service: "ServicePrincipal",
      arn: "PrincipalArn",
    },
  ],
  action: ["Operation"], # required
  condition: {
    "ConditionOperator" => {
      "ConditionKey" => "ConditionValue",
    },
  },
  expected_revision_id: "RevisionId",
})

Response structure


resp.resource_arn #=> String
resp.revision_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

  • :statement_id (required, String)

    The name of the statement. The ID is the same as the Sid IAM property. The statement name must be unique within the policy. For more information, see IAM JSON policy elements: Sid.

  • :effect (required, String)

    Determines whether the statement allows or denies access to the resource.

  • :principal (required, Array<Types::Principal>)

    An IAM principal, such as an IAM users, IAM roles, or AWS services that is allowed or denied access to a resource. For more information, see AWS JSON policy elements: Principal.

  • :action (required, Array<String>)

    The Amazon Lex action that this policy either allows or denies. The action must apply to the resource type of the specified ARN. For more information, see Actions, resources, and condition keys for Amazon Lex V2.

  • :condition (Hash<String,Hash>)

    Specifies a condition when the policy is in effect. If the principal of the policy is a service principal, you must provide two condition blocks, one with a SourceAccount global condition key and one with a SourceArn global condition key.

    For more information, see IAM JSON policy elements: Condition .

  • :expected_revision_id (String)

    The identifier of the revision of the policy to edit. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

    If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.

Returns:

See Also:



1451
1452
1453
1454
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 1451

def create_resource_policy_statement(params = {}, options = {})
  req = build_request(:create_resource_policy_statement, params)
  req.send_request(options)
end

#create_slot(params = {}) ⇒ Types::CreateSlotResponse

Creates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an OrderPizza intent might need slots for size, crust, and number of pizzas. For each slot, you define one or more utterances that Amazon Lex uses to elicit a response from the user.

Examples:

Request syntax with placeholder values


resp = client.create_slot({
  slot_name: "Name", # required
  description: "Description",
  slot_type_id: "BuiltInOrCustomSlotTypeId", # required
  value_elicitation_setting: { # required
    default_value_specification: {
      default_value_list: [ # required
        {
          default_value: "SlotDefaultValueString", # required
        },
      ],
    },
    slot_constraint: "Required", # required, accepts Required, Optional
    prompt_specification: {
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      max_retries: 1, # required
      allow_interrupt: false,
    },
    sample_utterances: [
      {
        utterance: "Utterance", # required
      },
    ],
    wait_and_continue_specification: {
      waiting_response: { # required
        message_groups: [ # required
          {
            message: { # required
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
            variations: [
              {
                plain_text_message: {
                  value: "PlainTextMessageValue", # required
                },
                custom_payload: {
                  value: "CustomPayloadValue", # required
                },
                ssml_message: {
                  value: "SSMLMessageValue", # required
                },
                image_response_card: {
                  title: "AttachmentTitle", # required
                  subtitle: "AttachmentTitle",
                  image_url: "AttachmentUrl",
                  buttons: [
                    {
                      text: "ButtonText", # required
                      value: "ButtonValue", # required
                    },
                  ],
                },
              },
            ],
          },
        ],
        allow_interrupt: false,
      },
      continue_response: { # required
        message_groups: [ # required
          {
            message: { # required
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
            variations: [
              {
                plain_text_message: {
                  value: "PlainTextMessageValue", # required
                },
                custom_payload: {
                  value: "CustomPayloadValue", # required
                },
                ssml_message: {
                  value: "SSMLMessageValue", # required
                },
                image_response_card: {
                  title: "AttachmentTitle", # required
                  subtitle: "AttachmentTitle",
                  image_url: "AttachmentUrl",
                  buttons: [
                    {
                      text: "ButtonText", # required
                      value: "ButtonValue", # required
                    },
                  ],
                },
              },
            ],
          },
        ],
        allow_interrupt: false,
      },
      still_waiting_response: {
        message_groups: [ # required
          {
            message: { # required
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
            variations: [
              {
                plain_text_message: {
                  value: "PlainTextMessageValue", # required
                },
                custom_payload: {
                  value: "CustomPayloadValue", # required
                },
                ssml_message: {
                  value: "SSMLMessageValue", # required
                },
                image_response_card: {
                  title: "AttachmentTitle", # required
                  subtitle: "AttachmentTitle",
                  image_url: "AttachmentUrl",
                  buttons: [
                    {
                      text: "ButtonText", # required
                      value: "ButtonValue", # required
                    },
                  ],
                },
              },
            ],
          },
        ],
        frequency_in_seconds: 1, # required
        timeout_in_seconds: 1, # required
        allow_interrupt: false,
      },
    },
  },
  obfuscation_setting: {
    obfuscation_setting_type: "None", # required, accepts None, DefaultObfuscation
  },
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
  intent_id: "Id", # required
  multiple_values_setting: {
    allow_multiple_values: false,
  },
})

Response structure


resp.slot_id #=> String
resp.slot_name #=> String
resp.description #=> String
resp.slot_type_id #=> String
resp.value_elicitation_setting.default_value_specification.default_value_list #=> Array
resp.value_elicitation_setting.default_value_specification.default_value_list[0].default_value #=> String
resp.value_elicitation_setting.slot_constraint #=> String, one of "Required", "Optional"
resp.value_elicitation_setting.prompt_specification.message_groups #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.prompt_specification.max_retries #=> Integer
resp.value_elicitation_setting.prompt_specification.allow_interrupt #=> Boolean
resp.value_elicitation_setting.sample_utterances #=> Array
resp.value_elicitation_setting.sample_utterances[0].utterance #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.allow_interrupt #=> Boolean
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.allow_interrupt #=> Boolean
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.frequency_in_seconds #=> Integer
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.timeout_in_seconds #=> Integer
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.allow_interrupt #=> Boolean
resp.obfuscation_setting.obfuscation_setting_type #=> String, one of "None", "DefaultObfuscation"
resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.intent_id #=> String
resp.creation_date_time #=> Time
resp.multiple_values_setting.allow_multiple_values #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :slot_name (required, String)

    The name of the slot. Slot names must be unique within the bot that contains the slot.

  • :description (String)

    A description of the slot. Use this to help identify the slot in lists.

  • :slot_type_id (required, String)

    The unique identifier for the slot type associated with this slot. The slot type determines the values that can be entered into the slot.

  • :value_elicitation_setting (required, Types::SlotValueElicitationSetting)

    Specifies prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot.

  • :obfuscation_setting (Types::ObfuscationSetting)

    Determines how slot values are used in Amazon CloudWatch logs. If the value of the obfuscationSetting parameter is DefaultObfuscation, slot values are obfuscated in the log output. If the value is None, the actual value is present in the log output.

    The default is to obfuscate values in the CloudWatch logs.

  • :bot_id (required, String)

    The identifier of the bot associated with the slot.

  • :bot_version (required, String)

    The version of the bot associated with the slot.

  • :locale_id (required, String)

    The identifier of the language and locale that the slot will be used in. The string must match one of the supported locales. All of the bots, intents, slot types used by the slot must have the same locale. For more information, see Supported languages.

  • :intent_id (required, String)

    The identifier of the intent that contains the slot.

  • :multiple_values_setting (Types::MultipleValuesSetting)

    Indicates whether the slot returns multiple values in one response. Multi-value slots are only available in the en-US locale. If you set this value to true in any other locale, Amazon Lex throws a ValidationException.

    If the multipleValuesSetting is not set, the default value is false.

Returns:

See Also:



1888
1889
1890
1891
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 1888

def create_slot(params = {}, options = {})
  req = build_request(:create_slot, params)
  req.send_request(options)
end

#create_slot_type(params = {}) ⇒ Types::CreateSlotTypeResponse

Creates a custom slot type

To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a slot of this type can assume.

Examples:

Request syntax with placeholder values


resp = client.create_slot_type({
  slot_type_name: "Name", # required
  description: "Description",
  slot_type_values: [
    {
      sample_value: {
        value: "Value", # required
      },
      synonyms: [
        {
          value: "Value", # required
        },
      ],
    },
  ],
  value_selection_setting: { # required
    resolution_strategy: "OriginalValue", # required, accepts OriginalValue, TopResolution
    regex_filter: {
      pattern: "RegexPattern", # required
    },
  },
  parent_slot_type_signature: "SlotTypeSignature",
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.slot_type_id #=> String
resp.slot_type_name #=> String
resp.description #=> String
resp.slot_type_values #=> Array
resp.slot_type_values[0].sample_value.value #=> String
resp.slot_type_values[0].synonyms #=> Array
resp.slot_type_values[0].synonyms[0].value #=> String
resp.value_selection_setting.resolution_strategy #=> String, one of "OriginalValue", "TopResolution"
resp.value_selection_setting.regex_filter.pattern #=> String
resp.parent_slot_type_signature #=> String
resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.creation_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :slot_type_name (required, String)

    The name for the slot. A slot type name must be unique within the account.

  • :description (String)

    A description of the slot type. Use the description to help identify the slot type in lists.

  • :slot_type_values (Array<Types::SlotTypeValue>)

    A list of SlotTypeValue objects that defines the values that the slot type can take. Each value can have a list of synonyms, additional values that help train the machine learning model about the values that it resolves for a slot.

  • :value_selection_setting (required, Types::SlotValueSelectionSetting)

    Determines the strategy that Amazon Lex uses to select a value from the list of possible values. The field can be set to one of the following values:

    • OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.

    • TopResolution - If there is a resolution list for the slot, return the first value in the resolution list. If there is no resolution list, return null.

    If you don't specify the valueSelectionSetting parameter, the default is OriginalValue.

  • :parent_slot_type_signature (String)

    The built-in slot type used as a parent of this slot type. When you define a parent slot type, the new slot type has the configuration of the parent slot type.

    Only AMAZON.AlphaNumeric is supported.

  • :bot_id (required, String)

    The identifier of the bot associated with this slot type.

  • :bot_version (required, String)

    The identifier of the bot version associated with this slot type.

  • :locale_id (required, String)

    The identifier of the language and locale that the slot type will be used in. The string must match one of the supported locales. All of the bots, intents, and slots used by the slot type must have the same locale. For more information, see Supported languages.

Returns:

See Also:



2014
2015
2016
2017
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2014

def create_slot_type(params = {}, options = {})
  req = build_request(:create_slot_type, params)
  req.send_request(options)
end

#create_upload_url(params = {}) ⇒ Types::CreateUploadUrlResponse

Gets a pre-signed S3 write URL that you use to upload the zip archive when importing a bot or a bot locale.

Examples:

Response structure


resp.import_id #=> String
resp.upload_url #=> String

Parameters:

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

    ({})

Returns:

See Also:



2036
2037
2038
2039
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2036

def create_upload_url(params = {}, options = {})
  req = build_request(:create_upload_url, params)
  req.send_request(options)
end

#delete_bot(params = {}) ⇒ Types::DeleteBotResponse

Deletes all versions of a bot, including the Draft version. To delete a specific version, use the DeleteBotVersion operation.

When you delete a bot, all of the resources contained in the bot are also deleted. Deleting a bot removes all locales, intents, slot, and slot types defined for the bot.

If a bot has an alias, the DeleteBot operation returns a ResourceInUseException exception. If you want to delete the bot and the alias, set the skipResourceInUseCheck parameter to true.

Examples:

Request syntax with placeholder values


resp = client.delete_bot({
  bot_id: "Id", # required
  skip_resource_in_use_check: false,
})

Response structure


resp.bot_id #=> String
resp.bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot to delete.

  • :skip_resource_in_use_check (Boolean)

    When true, Amazon Lex doesn't check to see if another resource, such as an alias, is using the bot before it is deleted.

Returns:

See Also:



2080
2081
2082
2083
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2080

def delete_bot(params = {}, options = {})
  req = build_request(:delete_bot, params)
  req.send_request(options)
end

#delete_bot_alias(params = {}) ⇒ Types::DeleteBotAliasResponse

Deletes the specified bot alias.

Examples:

Request syntax with placeholder values


resp = client.delete_bot_alias({
  bot_alias_id: "BotAliasId", # required
  bot_id: "Id", # required
  skip_resource_in_use_check: false,
})

Response structure


resp.bot_alias_id #=> String
resp.bot_id #=> String
resp.bot_alias_status #=> String, one of "Creating", "Available", "Deleting", "Failed"

Parameters:

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

    ({})

Options Hash (params):

  • :bot_alias_id (required, String)

    The unique identifier of the bot alias to delete.

  • :bot_id (required, String)

    The unique identifier of the bot associated with the alias to delete.

  • :skip_resource_in_use_check (Boolean)

    When this parameter is true, Amazon Lex doesn't check to see if any other resource is using the alias before it is deleted.

Returns:

See Also:



2121
2122
2123
2124
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2121

def delete_bot_alias(params = {}, options = {})
  req = build_request(:delete_bot_alias, params)
  req.send_request(options)
end

#delete_bot_locale(params = {}) ⇒ Types::DeleteBotLocaleResponse

Removes a locale from a bot.

When you delete a locale, all intents, slots, and slot types defined for the locale are also deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_bot_locale({
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.bot_locale_status #=> String, one of "Creating", "Building", "Built", "ReadyExpressTesting", "Failed", "Deleting", "NotBuilt", "Importing"

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The unique identifier of the bot that contains the locale.

  • :bot_version (required, String)

    The version of the bot that contains the locale.

  • :locale_id (required, String)

    The identifier of the language and locale that will be deleted. The string must match one of the supported locales. For more information, see Supported languages.

Returns:

See Also:



2172
2173
2174
2175
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2172

def delete_bot_locale(params = {}, options = {})
  req = build_request(:delete_bot_locale, params)
  req.send_request(options)
end

#delete_bot_version(params = {}) ⇒ Types::DeleteBotVersionResponse

Deletes a specific version of a bot. To delete all version of a bot, use the DeleteBot operation.

Examples:

Request syntax with placeholder values


resp = client.delete_bot_version({
  bot_id: "Id", # required
  bot_version: "NumericalBotVersion", # required
  skip_resource_in_use_check: false,
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot that contains the version.

  • :bot_version (required, String)

    The version of the bot to delete.

  • :skip_resource_in_use_check (Boolean)

    By default, the DeleteBotVersion operations throws a ResourceInUseException exception if you try to delete a bot version that has an alias pointing at it. Set the skipResourceInUseCheck parameter to true to skip this check and remove the version even if an alias points to it.

Returns:

See Also:



2217
2218
2219
2220
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2217

def delete_bot_version(params = {}, options = {})
  req = build_request(:delete_bot_version, params)
  req.send_request(options)
end

#delete_export(params = {}) ⇒ Types::DeleteExportResponse

Removes a previous export and the associated files stored in an S3 bucket.

Examples:

Request syntax with placeholder values


resp = client.delete_export({
  export_id: "Id", # required
})

Response structure


resp.export_id #=> String
resp.export_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"

Parameters:

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

    ({})

Options Hash (params):

  • :export_id (required, String)

    The unique identifier of the export to delete.

Returns:

See Also:



2248
2249
2250
2251
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2248

def delete_export(params = {}, options = {})
  req = build_request(:delete_export, params)
  req.send_request(options)
end

#delete_import(params = {}) ⇒ Types::DeleteImportResponse

Removes a previous import and the associated file stored in an S3 bucket.

Examples:

Request syntax with placeholder values


resp = client.delete_import({
  import_id: "Id", # required
})

Response structure


resp.import_id #=> String
resp.import_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"

Parameters:

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

    ({})

Options Hash (params):

  • :import_id (required, String)

    The unique identifier of the import to delete.

Returns:

See Also:



2279
2280
2281
2282
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2279

def delete_import(params = {}, options = {})
  req = build_request(:delete_import, params)
  req.send_request(options)
end

#delete_intent(params = {}) ⇒ Struct

Removes the specified intent.

Deleting an intent also deletes the slots associated with the intent.

Examples:

Request syntax with placeholder values


resp = client.delete_intent({
  intent_id: "Id", # required
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :intent_id (required, String)

    The unique identifier of the intent to delete.

  • :bot_id (required, String)

    The identifier of the bot associated with the intent.

  • :bot_version (required, String)

    The version of the bot associated with the intent.

  • :locale_id (required, String)

    The identifier of the language and locale where the bot will be deleted. The string must match one of the supported locales. For more information, see Supported languages.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2321
2322
2323
2324
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2321

def delete_intent(params = {}, options = {})
  req = build_request(:delete_intent, params)
  req.send_request(options)
end

#delete_resource_policy(params = {}) ⇒ Types::DeleteResourcePolicyResponse

Removes an existing policy from a bot or bot alias. If the resource doesn't have a policy attached, Amazon Lex returns an exception.

Examples:

Request syntax with placeholder values


resp = client.delete_resource_policy({
  resource_arn: "AmazonResourceName", # required
  expected_revision_id: "RevisionId",
})

Response structure


resp.resource_arn #=> String
resp.revision_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the bot or bot alias that has the resource policy attached.

  • :expected_revision_id (String)

    The identifier of the revision to edit. If this ID doesn't match the current revision number, Amazon Lex returns an exception

    If you don't specify a revision ID, Amazon Lex will delete the current policy.

Returns:

See Also:



2361
2362
2363
2364
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2361

def delete_resource_policy(params = {}, options = {})
  req = build_request(:delete_resource_policy, params)
  req.send_request(options)
end

#delete_resource_policy_statement(params = {}) ⇒ Types::DeleteResourcePolicyStatementResponse

Deletes a policy statement from a resource policy. If you delete the last statement from a policy, the policy is deleted. If you specify a statement ID that doesn't exist in the policy, or if the bot or bot alias doesn't have a policy attached, Amazon Lex returns an exception.

Examples:

Request syntax with placeholder values


resp = client.delete_resource_policy_statement({
  resource_arn: "AmazonResourceName", # required
  statement_id: "Name", # required
  expected_revision_id: "RevisionId",
})

Response structure


resp.resource_arn #=> String
resp.revision_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

  • :statement_id (required, String)

    The name of the statement (SID) to delete from the policy.

  • :expected_revision_id (String)

    The identifier of the revision of the policy to delete the statement from. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

    If you don't specify a revision, Amazon Lex removes the current contents of the statement.

Returns:

See Also:



2409
2410
2411
2412
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2409

def delete_resource_policy_statement(params = {}, options = {})
  req = build_request(:delete_resource_policy_statement, params)
  req.send_request(options)
end

#delete_slot(params = {}) ⇒ Struct

Deletes the specified slot from an intent.

Examples:

Request syntax with placeholder values


resp = client.delete_slot({
  slot_id: "Id", # required
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
  intent_id: "Id", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :slot_id (required, String)

    The identifier of the slot to delete.

  • :bot_id (required, String)

    The identifier of the bot associated with the slot to delete.

  • :bot_version (required, String)

    The version of the bot associated with the slot to delete.

  • :locale_id (required, String)

    The identifier of the language and locale that the slot will be deleted from. The string must match one of the supported locales. For more information, see Supported languages.

  • :intent_id (required, String)

    The identifier of the intent associated with the slot.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2453
2454
2455
2456
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2453

def delete_slot(params = {}, options = {})
  req = build_request(:delete_slot, params)
  req.send_request(options)
end

#delete_slot_type(params = {}) ⇒ Struct

Deletes a slot type from a bot locale.

If a slot is using the slot type, Amazon Lex throws a ResourceInUseException exception. To avoid the exception, set the skipResourceInUseCheck parameter to true.

Examples:

Request syntax with placeholder values


resp = client.delete_slot_type({
  slot_type_id: "Id", # required
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
  skip_resource_in_use_check: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :slot_type_id (required, String)

    The identifier of the slot type to delete.

  • :bot_id (required, String)

    The identifier of the bot associated with the slot type.

  • :bot_version (required, String)

    The version of the bot associated with the slot type.

  • :locale_id (required, String)

    The identifier of the language and locale that the slot type will be deleted from. The string must match one of the supported locales. For more information, see Supported languages.

  • :skip_resource_in_use_check (Boolean)

    By default, the DeleteSlotType operations throws a ResourceInUseException exception if you try to delete a slot type used by a slot. Set the skipResourceInUseCheck parameter to true to skip this check and remove the slot type even if a slot uses it.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2504
2505
2506
2507
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2504

def delete_slot_type(params = {}, options = {})
  req = build_request(:delete_slot_type, params)
  req.send_request(options)
end

#describe_bot(params = {}) ⇒ Types::DescribeBotResponse

Provides metadata information about a bot.

Examples:

Request syntax with placeholder values


resp = client.describe_bot({
  bot_id: "Id", # required
})

Response structure


resp.bot_id #=> String
resp.bot_name #=> String
resp.description #=> String
resp.role_arn #=> String
resp.data_privacy.child_directed #=> Boolean
resp.idle_session_ttl_in_seconds #=> Integer
resp.bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The unique identifier of the bot to describe.

Returns:

See Also:



2548
2549
2550
2551
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2548

def describe_bot(params = {}, options = {})
  req = build_request(:describe_bot, params)
  req.send_request(options)
end

#describe_bot_alias(params = {}) ⇒ Types::DescribeBotAliasResponse

Get information about a specific bot alias.

Examples:

Request syntax with placeholder values


resp = client.describe_bot_alias({
  bot_alias_id: "BotAliasId", # required
  bot_id: "Id", # required
})

Response structure


resp.bot_alias_id #=> String
resp.bot_alias_name #=> String
resp.description #=> String
resp.bot_version #=> String
resp.bot_alias_locale_settings #=> Hash
resp.bot_alias_locale_settings["LocaleId"].enabled #=> Boolean
resp.bot_alias_locale_settings["LocaleId"].code_hook_specification.lambda_code_hook.lambda_arn #=> String
resp.bot_alias_locale_settings["LocaleId"].code_hook_specification.lambda_code_hook.code_hook_interface_version #=> String
resp.conversation_log_settings.text_log_settings #=> Array
resp.conversation_log_settings.text_log_settings[0].enabled #=> Boolean
resp.conversation_log_settings.text_log_settings[0].destination.cloud_watch.cloud_watch_log_group_arn #=> String
resp.conversation_log_settings.text_log_settings[0].destination.cloud_watch.log_prefix #=> String
resp.conversation_log_settings.audio_log_settings #=> Array
resp.conversation_log_settings.audio_log_settings[0].enabled #=> Boolean
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.kms_key_arn #=> String
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.s3_bucket_arn #=> String
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.log_prefix #=> String
resp.sentiment_analysis_settings.detect_sentiment #=> Boolean
resp.bot_alias_history_events #=> Array
resp.bot_alias_history_events[0].bot_version #=> String
resp.bot_alias_history_events[0].start_date #=> Time
resp.bot_alias_history_events[0].end_date #=> Time
resp.bot_alias_status #=> String, one of "Creating", "Available", "Deleting", "Failed"
resp.bot_id #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_alias_id (required, String)

    The identifier of the bot alias to describe.

  • :bot_id (required, String)

    The identifier of the bot associated with the bot alias to describe.

Returns:

See Also:



2616
2617
2618
2619
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2616

def describe_bot_alias(params = {}, options = {})
  req = build_request(:describe_bot_alias, params)
  req.send_request(options)
end

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

Describes the settings that a bot has for a specific locale.

Examples:

Request syntax with placeholder values


resp = client.describe_bot_locale({
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.locale_name #=> String
resp.description #=> String
resp.nlu_intent_confidence_threshold #=> Float
resp.voice_settings.voice_id #=> String
resp.intents_count #=> Integer
resp.slot_types_count #=> Integer
resp.bot_locale_status #=> String, one of "Creating", "Building", "Built", "ReadyExpressTesting", "Failed", "Deleting", "NotBuilt", "Importing"
resp.failure_reasons #=> Array
resp.failure_reasons[0] #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time
resp. #=> Time
resp.bot_locale_history_events #=> Array
resp.bot_locale_history_events[0].event #=> String
resp.bot_locale_history_events[0].event_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot associated with the locale.

  • :bot_version (required, String)

    The identifier of 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:

See Also:



2689
2690
2691
2692
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2689

def describe_bot_locale(params = {}, options = {})
  req = build_request(:describe_bot_locale, params)
  req.send_request(options)
end

#describe_bot_version(params = {}) ⇒ Types::DescribeBotVersionResponse

Provides metadata about a version of a bot.

Examples:

Request syntax with placeholder values


resp = client.describe_bot_version({
  bot_id: "Id", # required
  bot_version: "NumericalBotVersion", # required
})

Response structure


resp.bot_id #=> String
resp.bot_name #=> String
resp.bot_version #=> String
resp.description #=> String
resp.role_arn #=> String
resp.data_privacy.child_directed #=> Boolean
resp.idle_session_ttl_in_seconds #=> Integer
resp.bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"
resp.failure_reasons #=> Array
resp.failure_reasons[0] #=> String
resp.creation_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot containing the version to return metadata for.

  • :bot_version (required, String)

    The version of the bot to return metadata for.

Returns:

See Also:



2741
2742
2743
2744
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2741

def describe_bot_version(params = {}, options = {})
  req = build_request(:describe_bot_version, params)
  req.send_request(options)
end

#describe_export(params = {}) ⇒ Types::DescribeExportResponse

Gets information about a specific export.

Examples:

Request syntax with placeholder values


resp = client.describe_export({
  export_id: "Id", # required
})

Response structure


resp.export_id #=> String
resp.resource_specification.bot_export_specification.bot_id #=> String
resp.resource_specification.bot_export_specification.bot_version #=> String
resp.resource_specification.bot_locale_export_specification.bot_id #=> String
resp.resource_specification.bot_locale_export_specification.bot_version #=> String
resp.resource_specification.bot_locale_export_specification.locale_id #=> String
resp.file_format #=> String, one of "LexJson"
resp.export_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"
resp.failure_reasons #=> Array
resp.failure_reasons[0] #=> String
resp.download_url #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :export_id (required, String)

    The unique identifier of the export to describe.

Returns:

See Also:



2788
2789
2790
2791
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2788

def describe_export(params = {}, options = {})
  req = build_request(:describe_export, params)
  req.send_request(options)
end

#describe_import(params = {}) ⇒ Types::DescribeImportResponse

Gets information about a specific import.

Examples:

Request syntax with placeholder values


resp = client.describe_import({
  import_id: "Id", # required
})

Response structure


resp.import_id #=> String
resp.resource_specification.bot_import_specification.bot_name #=> String
resp.resource_specification.bot_import_specification.role_arn #=> String
resp.resource_specification.bot_import_specification.data_privacy.child_directed #=> Boolean
resp.resource_specification.bot_import_specification.idle_session_ttl_in_seconds #=> Integer
resp.resource_specification.bot_import_specification.bot_tags #=> Hash
resp.resource_specification.bot_import_specification.bot_tags["TagKey"] #=> String
resp.resource_specification.bot_import_specification.test_bot_alias_tags #=> Hash
resp.resource_specification.bot_import_specification.test_bot_alias_tags["TagKey"] #=> String
resp.resource_specification.bot_locale_import_specification.bot_id #=> String
resp.resource_specification.bot_locale_import_specification.bot_version #=> String
resp.resource_specification.bot_locale_import_specification.locale_id #=> String
resp.resource_specification.bot_locale_import_specification.nlu_intent_confidence_threshold #=> Float
resp.resource_specification.bot_locale_import_specification.voice_settings.voice_id #=> String
resp.imported_resource_id #=> String
resp.imported_resource_name #=> String
resp.merge_strategy #=> String, one of "Overwrite", "FailOnConflict"
resp.import_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"
resp.failure_reasons #=> Array
resp.failure_reasons[0] #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :import_id (required, String)

    The unique identifier of the import to describe.

Returns:

See Also:



2845
2846
2847
2848
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2845

def describe_import(params = {}, options = {})
  req = build_request(:describe_import, params)
  req.send_request(options)
end

#describe_intent(params = {}) ⇒ Types::DescribeIntentResponse

Returns metadata about an intent.

Examples:

Request syntax with placeholder values


resp = client.describe_intent({
  intent_id: "Id", # required
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.intent_id #=> String
resp.intent_name #=> String
resp.description #=> String
resp.parent_intent_signature #=> String
resp.sample_utterances #=> Array
resp.sample_utterances[0].utterance #=> String
resp.dialog_code_hook.enabled #=> Boolean
resp.fulfillment_code_hook.enabled #=> Boolean
resp.slot_priorities #=> Array
resp.slot_priorities[0].priority #=> Integer
resp.slot_priorities[0].slot_id #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.plain_text_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.custom_payload.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.ssml_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.title #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.subtitle #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.image_url #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].plain_text_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].custom_payload.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].ssml_message.value #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.title #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.prompt_specification.max_retries #=> Integer
resp.intent_confirmation_setting.prompt_specification.allow_interrupt #=> Boolean
resp.intent_confirmation_setting.declination_response.message_groups #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].message.plain_text_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.custom_payload.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.ssml_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.title #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.image_url #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.intent_confirmation_setting.declination_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.intent_confirmation_setting.declination_response.allow_interrupt #=> Boolean
resp.intent_closing_setting.closing_response.message_groups #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].message.plain_text_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.custom_payload.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.ssml_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.title #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.image_url #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.intent_closing_setting.closing_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.intent_closing_setting.closing_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.intent_closing_setting.closing_response.allow_interrupt #=> Boolean
resp.input_contexts #=> Array
resp.input_contexts[0].name #=> String
resp.output_contexts #=> Array
resp.output_contexts[0].name #=> String
resp.output_contexts[0].time_to_live_in_seconds #=> Integer
resp.output_contexts[0].turns_to_live #=> Integer
resp.kendra_configuration.kendra_index #=> String
resp.kendra_configuration.query_filter_string_enabled #=> Boolean
resp.kendra_configuration.query_filter_string #=> String
resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :intent_id (required, String)

    The identifier of the intent to describe.

  • :bot_id (required, String)

    The identifier of the bot associated with the intent.

  • :bot_version (required, String)

    The version of the bot associated with the intent.

  • :locale_id (required, String)

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

Returns:

See Also:



2996
2997
2998
2999
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 2996

def describe_intent(params = {}, options = {})
  req = build_request(:describe_intent, params)
  req.send_request(options)
end

#describe_resource_policy(params = {}) ⇒ Types::DescribeResourcePolicyResponse

Gets the resource policy and policy revision for a bot or bot alias.

Examples:

Request syntax with placeholder values


resp = client.describe_resource_policy({
  resource_arn: "AmazonResourceName", # required
})

Response structure


resp.resource_arn #=> String
resp.policy #=> String
resp.revision_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

Returns:

See Also:



3029
3030
3031
3032
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3029

def describe_resource_policy(params = {}, options = {})
  req = build_request(:describe_resource_policy, params)
  req.send_request(options)
end

#describe_slot(params = {}) ⇒ Types::DescribeSlotResponse

Gets metadata information about a slot.

Examples:

Request syntax with placeholder values


resp = client.describe_slot({
  slot_id: "Id", # required
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  locale_id: "LocaleId", # required
  intent_id: "Id", # required
})

Response structure


resp.slot_id #=> String
resp.slot_name #=> String
resp.description #=> String
resp.slot_type_id #=> String
resp.value_elicitation_setting.default_value_specification.default_value_list #=> Array
resp.value_elicitation_setting.default_value_specification.default_value_list[0].default_value #=> String
resp.value_elicitation_setting.slot_constraint #=> String, one of "Required", "Optional"
resp.value_elicitation_setting.prompt_specification.message_groups #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.prompt_specification.max_retries #=> Integer
resp.value_elicitation_setting.prompt_specification.allow_interrupt #=> Boolean
resp.value_elicitation_setting.sample_utterances #=> Array
resp.value_elicitation_setting.sample_utterances[0].utterance #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.waiting_response.allow_interrupt #=> Boolean
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.continue_response.allow_interrupt #=> Boolean
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].plain_text_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].custom_payload.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].ssml_message.value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.title #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.frequency_in_seconds #=> Integer
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.timeout_in_seconds #=> Integer
resp.value_elicitation_setting.wait_and_continue_specification.still_waiting_response.allow_interrupt #=> Boolean
resp.obfuscation_setting.obfuscation_setting_type #=> String, one of "None", "DefaultObfuscation"
resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.intent_id #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time
resp.multiple_values_setting.allow_multiple_values #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :slot_id (required, String)

    The unique identifier for the slot.

  • :bot_id (required, String)

    The identifier of the bot associated with the slot.

  • :bot_version (required, String)

    The version of the bot associated with the slot.

  • :locale_id (required, String)

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

  • :intent_id (required, String)

    The identifier of the intent that contains the slot.

Returns:

See Also:



3194
3195
3196
3197
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3194

def describe_slot(params = {}, options = {})
  req = build_request(:describe_slot, params)
  req.send_request(options)
end

#describe_slot_type(params = {}) ⇒ Types::DescribeSlotTypeResponse

Gets metadata information about a slot type.

Examples:

Request syntax with placeholder values


resp = client.describe_slot_type({
  slot_type_id: "Id", # required
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.slot_type_id #=> String
resp.slot_type_name #=> String
resp.description #=> String
resp.slot_type_values #=> Array
resp.slot_type_values[0].sample_value.value #=> String
resp.slot_type_values[0].synonyms #=> Array
resp.slot_type_values[0].synonyms[0].value #=> String
resp.value_selection_setting.resolution_strategy #=> String, one of "OriginalValue", "TopResolution"
resp.value_selection_setting.regex_filter.pattern #=> String
resp.parent_slot_type_signature #=> String
resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :slot_type_id (required, String)

    The identifier of the slot type.

  • :bot_id (required, String)

    The identifier of the bot associated with the slot type.

  • :bot_version (required, String)

    The version of the bot associated with the slot type.

  • :locale_id (required, String)

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

Returns:

See Also:



3264
3265
3266
3267
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3264

def describe_slot_type(params = {}, options = {})
  req = build_request(:describe_slot_type, params)
  req.send_request(options)
end

#list_bot_aliases(params = {}) ⇒ Types::ListBotAliasesResponse

Gets a list of aliases for the specified bot.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_bot_aliases({
  bot_id: "Id", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_alias_summaries #=> Array
resp.bot_alias_summaries[0].bot_alias_id #=> String
resp.bot_alias_summaries[0].bot_alias_name #=> String
resp.bot_alias_summaries[0].description #=> String
resp.bot_alias_summaries[0].bot_version #=> String
resp.bot_alias_summaries[0].bot_alias_status #=> String, one of "Creating", "Available", "Deleting", "Failed"
resp.bot_alias_summaries[0].creation_date_time #=> Time
resp.bot_alias_summaries[0].last_updated_date_time #=> Time
resp.next_token #=> String
resp.bot_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot to list aliases for.

  • :max_results (Integer)

    The maximum number of aliases to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListBotAliases operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3318
3319
3320
3321
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3318

def list_bot_aliases(params = {}, options = {})
  req = build_request(:list_bot_aliases, params)
  req.send_request(options)
end

#list_bot_locales(params = {}) ⇒ Types::ListBotLocalesResponse

Gets a list of locales for the specified bot.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_bot_locales({
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  sort_by: {
    attribute: "BotLocaleName", # required, accepts BotLocaleName
    order: "Ascending", # required, accepts Ascending, Descending
  },
  filters: [
    {
      name: "BotLocaleName", # required, accepts BotLocaleName
      values: ["FilterValue"], # required
      operator: "CO", # required, accepts CO, EQ
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.next_token #=> String
resp.bot_locale_summaries #=> Array
resp.bot_locale_summaries[0].locale_id #=> String
resp.bot_locale_summaries[0].locale_name #=> String
resp.bot_locale_summaries[0].description #=> String
resp.bot_locale_summaries[0].bot_locale_status #=> String, one of "Creating", "Building", "Built", "ReadyExpressTesting", "Failed", "Deleting", "NotBuilt", "Importing"
resp.bot_locale_summaries[0].last_updated_date_time #=> Time
resp.bot_locale_summaries[0]. #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot to list locales for.

  • :bot_version (required, String)

    The version of the bot to list locales for.

  • :sort_by (Types::BotLocaleSortBy)

    Specifies sorting parameters for the list of locales. You can sort by locale name in ascending or descending order.

  • :filters (Array<Types::BotLocaleFilter>)

    Provides the specification for a filter used to limit the response to only those locales that match the filter specification. You can only specify one filter and one value to filter on.

  • :max_results (Integer)

    The maximum number of aliases to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListBotLocales operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token as the nextToken parameter to return the next page of results.

Returns:

See Also:



3397
3398
3399
3400
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3397

def list_bot_locales(params = {}, options = {})
  req = build_request(:list_bot_locales, params)
  req.send_request(options)
end

#list_bot_versions(params = {}) ⇒ Types::ListBotVersionsResponse

Gets information about all of the versions of a bot.

The ListBotVersions operation returns a summary of each version of a bot. For example, if a bot has three numbered versions, the ListBotVersions operation returns for summaries, one for each numbered version and one for the DRAFT version.

The ListBotVersions operation always returns at least one version, the DRAFT version.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_bot_versions({
  bot_id: "Id", # required
  sort_by: {
    attribute: "BotVersion", # required, accepts BotVersion
    order: "Ascending", # required, accepts Ascending, Descending
  },
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_id #=> String
resp.bot_version_summaries #=> Array
resp.bot_version_summaries[0].bot_name #=> String
resp.bot_version_summaries[0].bot_version #=> String
resp.bot_version_summaries[0].description #=> String
resp.bot_version_summaries[0].bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"
resp.bot_version_summaries[0].creation_date_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot to list versions for.

  • :sort_by (Types::BotVersionSortBy)

    Specifies sorting parameters for the list of versions. You can specify that the list be sorted by version name in either ascending or descending order.

  • :max_results (Integer)

    The maximum number of versions to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response to the ListBotVersion operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3466
3467
3468
3469
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3466

def list_bot_versions(params = {}, options = {})
  req = build_request(:list_bot_versions, params)
  req.send_request(options)
end

#list_bots(params = {}) ⇒ Types::ListBotsResponse

Gets a list of available bots.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_bots({
  sort_by: {
    attribute: "BotName", # required, accepts BotName
    order: "Ascending", # required, accepts Ascending, Descending
  },
  filters: [
    {
      name: "BotName", # required, accepts BotName
      values: ["FilterValue"], # required
      operator: "CO", # required, accepts CO, EQ
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_summaries #=> Array
resp.bot_summaries[0].bot_id #=> String
resp.bot_summaries[0].bot_name #=> String
resp.bot_summaries[0].description #=> String
resp.bot_summaries[0].bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"
resp.bot_summaries[0].latest_bot_version #=> String
resp.bot_summaries[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :sort_by (Types::BotSortBy)

    Specifies sorting parameters for the list of bots. You can specify that the list be sorted by bot name in ascending or descending order.

  • :filters (Array<Types::BotFilter>)

    Provides the specification of a filter used to limit the bots in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.

  • :max_results (Integer)

    The maximum number of bots to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListBots operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3533
3534
3535
3536
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3533

def list_bots(params = {}, options = {})
  req = build_request(:list_bots, params)
  req.send_request(options)
end

#list_built_in_intents(params = {}) ⇒ Types::ListBuiltInIntentsResponse

Gets a list of built-in intents provided by Amazon Lex that you can use in your bot.

To use a built-in intent as a the base for your own intent, include the built-in intent signature in the parentIntentSignature parameter when you call the CreateIntent operation. For more information, see CreateIntent.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_built_in_intents({
  locale_id: "LocaleId", # required
  sort_by: {
    attribute: "IntentSignature", # required, accepts IntentSignature
    order: "Ascending", # required, accepts Ascending, Descending
  },
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.built_in_intent_summaries #=> Array
resp.built_in_intent_summaries[0].intent_signature #=> String
resp.built_in_intent_summaries[0].description #=> String
resp.next_token #=> String
resp.locale_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :locale_id (required, String)

    The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages.

  • :sort_by (Types::BuiltInIntentSortBy)

    Specifies sorting parameters for the list of built-in intents. You can specify that the list be sorted by the built-in intent signature in either ascending or descending order.

  • :max_results (Integer)

    The maximum number of built-in intents to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListBuiltInIntents operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3603
3604
3605
3606
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3603

def list_built_in_intents(params = {}, options = {})
  req = build_request(:list_built_in_intents, params)
  req.send_request(options)
end

#list_built_in_slot_types(params = {}) ⇒ Types::ListBuiltInSlotTypesResponse

Gets a list of built-in slot types that meet the specified criteria.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_built_in_slot_types({
  locale_id: "LocaleId", # required
  sort_by: {
    attribute: "SlotTypeSignature", # required, accepts SlotTypeSignature
    order: "Ascending", # required, accepts Ascending, Descending
  },
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.built_in_slot_type_summaries #=> Array
resp.built_in_slot_type_summaries[0].slot_type_signature #=> String
resp.built_in_slot_type_summaries[0].description #=> String
resp.next_token #=> String
resp.locale_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :locale_id (required, String)

    The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see Supported languages.

  • :sort_by (Types::BuiltInSlotTypeSortBy)

    Determines the sort order for the response from the ListBuiltInSlotTypes operation. You can choose to sort by the slot type signature in either ascending or descending order.

  • :max_results (Integer)

    The maximum number of built-in slot types to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListBuiltInSlotTypes operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3667
3668
3669
3670
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3667

def list_built_in_slot_types(params = {}, options = {})
  req = build_request(:list_built_in_slot_types, params)
  req.send_request(options)
end

#list_exports(params = {}) ⇒ Types::ListExportsResponse

Lists the exports for a bot or bot locale. Exports are kept in the list for 7 days.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_exports({
  bot_id: "Id",
  bot_version: "BotVersion",
  sort_by: {
    attribute: "LastUpdatedDateTime", # required, accepts LastUpdatedDateTime
    order: "Ascending", # required, accepts Ascending, Descending
  },
  filters: [
    {
      name: "ExportResourceType", # required, accepts ExportResourceType
      values: ["FilterValue"], # required
      operator: "CO", # required, accepts CO, EQ
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.export_summaries #=> Array
resp.export_summaries[0].export_id #=> String
resp.export_summaries[0].resource_specification.bot_export_specification.bot_id #=> String
resp.export_summaries[0].resource_specification.bot_export_specification.bot_version #=> String
resp.export_summaries[0].resource_specification.bot_locale_export_specification.bot_id #=> String
resp.export_summaries[0].resource_specification.bot_locale_export_specification.bot_version #=> String
resp.export_summaries[0].resource_specification.bot_locale_export_specification.locale_id #=> String
resp.export_summaries[0].file_format #=> String, one of "LexJson"
resp.export_summaries[0].export_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"
resp.export_summaries[0].creation_date_time #=> Time
resp.export_summaries[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (String)

    The unique identifier that Amazon Lex assigned to the bot.

  • :bot_version (String)

    The version of the bot to list exports for.

  • :sort_by (Types::ExportSortBy)

    Determines the field that the list of exports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.

  • :filters (Array<Types::ExportFilter>)

    Provides the specification of a filter used to limit the exports in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.

  • :max_results (Integer)

    The maximum number of exports to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListExports operation contans more results that specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3752
3753
3754
3755
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3752

def list_exports(params = {}, options = {})
  req = build_request(:list_exports, params)
  req.send_request(options)
end

#list_imports(params = {}) ⇒ Types::ListImportsResponse

Lists the imports for a bot or bot locale. Imports are kept in the list for 7 days.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_imports({
  bot_id: "Id",
  bot_version: "DraftBotVersion",
  sort_by: {
    attribute: "LastUpdatedDateTime", # required, accepts LastUpdatedDateTime
    order: "Ascending", # required, accepts Ascending, Descending
  },
  filters: [
    {
      name: "ImportResourceType", # required, accepts ImportResourceType
      values: ["FilterValue"], # required
      operator: "CO", # required, accepts CO, EQ
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.import_summaries #=> Array
resp.import_summaries[0].import_id #=> String
resp.import_summaries[0].imported_resource_id #=> String
resp.import_summaries[0].imported_resource_name #=> String
resp.import_summaries[0].import_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"
resp.import_summaries[0].merge_strategy #=> String, one of "Overwrite", "FailOnConflict"
resp.import_summaries[0].creation_date_time #=> Time
resp.import_summaries[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (String)

    The unique identifier that Amazon Lex assigned to the bot.

  • :bot_version (String)

    The version of the bot to list imports for.

  • :sort_by (Types::ImportSortBy)

    Determines the field that the list of imports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.

  • :filters (Array<Types::ImportFilter>)

    Provides the specification of a filter used to limit the bots in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.

  • :max_results (Integer)

    The maximum number of imports to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListImports operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3834
3835
3836
3837
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3834

def list_imports(params = {}, options = {})
  req = build_request(:list_imports, params)
  req.send_request(options)
end

#list_intents(params = {}) ⇒ Types::ListIntentsResponse

Get a list of intents that meet the specified criteria.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_intents({
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  locale_id: "LocaleId", # required
  sort_by: {
    attribute: "IntentName", # required, accepts IntentName, LastUpdatedDateTime
    order: "Ascending", # required, accepts Ascending, Descending
  },
  filters: [
    {
      name: "IntentName", # required, accepts IntentName
      values: ["FilterValue"], # required
      operator: "CO", # required, accepts CO, EQ
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.intent_summaries #=> Array
resp.intent_summaries[0].intent_id #=> String
resp.intent_summaries[0].intent_name #=> String
resp.intent_summaries[0].description #=> String
resp.intent_summaries[0].parent_intent_signature #=> String
resp.intent_summaries[0].input_contexts #=> Array
resp.intent_summaries[0].input_contexts[0].name #=> String
resp.intent_summaries[0].output_contexts #=> Array
resp.intent_summaries[0].output_contexts[0].name #=> String
resp.intent_summaries[0].output_contexts[0].time_to_live_in_seconds #=> Integer
resp.intent_summaries[0].output_contexts[0].turns_to_live #=> Integer
resp.intent_summaries[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The unique identifier of the bot that contains the intent.

  • :bot_version (required, String)

    The version of the bot that contains the intent.

  • :locale_id (required, String)

    The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages.

  • :sort_by (Types::IntentSortBy)

    Determines the sort order for the response from the ListIntents operation. You can choose to sort by the intent name or last updated date in either ascending or descending order.

  • :filters (Array<Types::IntentFilter>)

    Provides the specification of a filter used to limit the intents in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.

  • :max_results (Integer)

    The maximum number of intents to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListIntents operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



3931
3932
3933
3934
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 3931

def list_intents(params = {}, options = {})
  req = build_request(:list_intents, params)
  req.send_request(options)
end

#list_slot_types(params = {}) ⇒ Types::ListSlotTypesResponse

Gets a list of slot types that match the specified criteria.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_slot_types({
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  locale_id: "LocaleId", # required
  sort_by: {
    attribute: "SlotTypeName", # required, accepts SlotTypeName, LastUpdatedDateTime
    order: "Ascending", # required, accepts Ascending, Descending
  },
  filters: [
    {
      name: "SlotTypeName", # required, accepts SlotTypeName
      values: ["FilterValue"], # required
      operator: "CO", # required, accepts CO, EQ
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.slot_type_summaries #=> Array
resp.slot_type_summaries[0].slot_type_id #=> String
resp.slot_type_summaries[0].slot_type_name #=> String
resp.slot_type_summaries[0].description #=> String
resp.slot_type_summaries[0].parent_slot_type_signature #=> String
resp.slot_type_summaries[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The unique identifier of the bot that contains the slot types.

  • :bot_version (required, String)

    The version of the bot that contains the slot type.

  • :locale_id (required, String)

    The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see Supported languages.

  • :sort_by (Types::SlotTypeSortBy)

    Determines the sort order for the response from the ListSlotTypes operation. You can choose to sort by the slot type name or last updated date in either ascending or descending order.

  • :filters (Array<Types::SlotTypeFilter>)

    Provides the specification of a filter used to limit the slot types in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.

  • :max_results (Integer)

    The maximum number of slot types to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListSlotTypes operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



4022
4023
4024
4025
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4022

def list_slot_types(params = {}, options = {})
  req = build_request(:list_slot_types, params)
  req.send_request(options)
end

#list_slots(params = {}) ⇒ Types::ListSlotsResponse

Gets a list of slots that match the specified criteria.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_slots({
  bot_id: "Id", # required
  bot_version: "BotVersion", # required
  locale_id: "LocaleId", # required
  intent_id: "Id", # required
  sort_by: {
    attribute: "SlotName", # required, accepts SlotName, LastUpdatedDateTime
    order: "Ascending", # required, accepts Ascending, Descending
  },
  filters: [
    {
      name: "SlotName", # required, accepts SlotName
      values: ["FilterValue"], # required
      operator: "CO", # required, accepts CO, EQ
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.intent_id #=> String
resp.slot_summaries #=> Array
resp.slot_summaries[0].slot_id #=> String
resp.slot_summaries[0].slot_name #=> String
resp.slot_summaries[0].description #=> String
resp.slot_summaries[0].slot_constraint #=> String, one of "Required", "Optional"
resp.slot_summaries[0].slot_type_id #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups #=> Array
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.plain_text_message.value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.custom_payload.value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.ssml_message.value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.image_response_card.title #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.image_response_card.subtitle #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.image_response_card.image_url #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.image_response_card.buttons #=> Array
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.image_response_card.buttons[0].text #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].message.image_response_card.buttons[0].value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations #=> Array
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].plain_text_message.value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].custom_payload.value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].ssml_message.value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].image_response_card.title #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].image_response_card.subtitle #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].image_response_card.image_url #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].image_response_card.buttons #=> Array
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].text #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.message_groups[0].variations[0].image_response_card.buttons[0].value #=> String
resp.slot_summaries[0].value_elicitation_prompt_specification.max_retries #=> Integer
resp.slot_summaries[0].value_elicitation_prompt_specification.allow_interrupt #=> Boolean
resp.slot_summaries[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The identifier of the bot that contains the slot.

  • :bot_version (required, String)

    The version of the bot that contains the slot.

  • :locale_id (required, String)

    The identifier of the language and locale of the slots to list. The string must match one of the supported locales. For more information, see Supported languages.

  • :intent_id (required, String)

    The unique identifier of the intent that contains the slot.

  • :sort_by (Types::SlotSortBy)

    Determines the sort order for the response from the ListSlots operation. You can choose to sort by the slot name or last updated date in either ascending or descending order.

  • :filters (Array<Types::SlotFilter>)

    Provides the specification of a filter used to limit the slots in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.

  • :max_results (Integer)

    The maximum number of slots to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.

  • :next_token (String)

    If the response from the ListSlots operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Returns:

See Also:



4142
4143
4144
4145
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4142

def list_slots(params = {}, options = {})
  req = build_request(:list_slots, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Gets a list of tags associated with a resource. Only bots, bot aliases, and bot channels can have tags associated with them.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "AmazonResourceName", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to get a list of tags for.

Returns:

See Also:



4173
4174
4175
4176
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4173

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#start_import(params = {}) ⇒ Types::StartImportResponse

Starts importing a bot or bot locale from a zip archive that you uploaded to an S3 bucket.

Examples:

Request syntax with placeholder values


resp = client.start_import({
  import_id: "Id", # required
  resource_specification: { # required
    bot_import_specification: {
      bot_name: "Name", # required
      role_arn: "RoleArn", # required
      data_privacy: { # required
        child_directed: false, # required
      },
      idle_session_ttl_in_seconds: 1,
      bot_tags: {
        "TagKey" => "TagValue",
      },
      test_bot_alias_tags: {
        "TagKey" => "TagValue",
      },
    },
    bot_locale_import_specification: {
      bot_id: "Id", # required
      bot_version: "DraftBotVersion", # required
      locale_id: "LocaleId", # required
      nlu_intent_confidence_threshold: 1.0,
      voice_settings: {
        voice_id: "VoiceId", # required
      },
    },
  },
  merge_strategy: "Overwrite", # required, accepts Overwrite, FailOnConflict
  file_password: "ImportExportFilePassword",
})

Response structure


resp.import_id #=> String
resp.resource_specification.bot_import_specification.bot_name #=> String
resp.resource_specification.bot_import_specification.role_arn #=> String
resp.resource_specification.bot_import_specification.data_privacy.child_directed #=> Boolean
resp.resource_specification.bot_import_specification.idle_session_ttl_in_seconds #=> Integer
resp.resource_specification.bot_import_specification.bot_tags #=> Hash
resp.resource_specification.bot_import_specification.bot_tags["TagKey"] #=> String
resp.resource_specification.bot_import_specification.test_bot_alias_tags #=> Hash
resp.resource_specification.bot_import_specification.test_bot_alias_tags["TagKey"] #=> String
resp.resource_specification.bot_locale_import_specification.bot_id #=> String
resp.resource_specification.bot_locale_import_specification.bot_version #=> String
resp.resource_specification.bot_locale_import_specification.locale_id #=> String
resp.resource_specification.bot_locale_import_specification.nlu_intent_confidence_threshold #=> Float
resp.resource_specification.bot_locale_import_specification.voice_settings.voice_id #=> String
resp.merge_strategy #=> String, one of "Overwrite", "FailOnConflict"
resp.import_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"
resp.creation_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :import_id (required, String)

    The unique identifier for the import. It is included in the response from the operation.

  • :resource_specification (required, Types::ImportResourceSpecification)

    Parameters for creating the bot or bot locale.

  • :merge_strategy (required, String)

    The strategy to use when there is a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.

  • :file_password (String)

    The password used to encrypt the zip archive that contains the bot or bot locale definition. You should always encrypt the zip archive to protect it during transit between your site and Amazon Lex.

Returns:

See Also:



4264
4265
4266
4267
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4264

def start_import(params = {}, options = {})
  req = build_request(:start_import, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced with the new value.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag.

  • :tags (required, Hash<String,String>)

    A list of tag keys to add to the resource. If a tag key already exists, the existing value is replaced with the new value.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4295
4296
4297
4298
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4295

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes tags from a bot, bot alias, or bot channel.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "AmazonResourceName", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to remove the tags from.

  • :tag_keys (required, Array<String>)

    A list of tag keys to remove from the resource. If a tag key does not exist on the resource, it is ignored.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4323
4324
4325
4326
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4323

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_bot(params = {}) ⇒ Types::UpdateBotResponse

Updates the configuration of an existing bot.

Examples:

Request syntax with placeholder values


resp = client.update_bot({
  bot_id: "Id", # required
  bot_name: "Name", # required
  description: "Description",
  role_arn: "RoleArn", # required
  data_privacy: { # required
    child_directed: false, # required
  },
  idle_session_ttl_in_seconds: 1, # required
})

Response structure


resp.bot_id #=> String
resp.bot_name #=> String
resp.description #=> String
resp.role_arn #=> String
resp.data_privacy.child_directed #=> Boolean
resp.idle_session_ttl_in_seconds #=> Integer
resp.bot_status #=> String, one of "Creating", "Available", "Inactive", "Deleting", "Failed", "Versioning", "Importing"
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The unique identifier of the bot to update. This identifier is returned by the CreateBot operation.

  • :bot_name (required, String)

    The new name of the bot. The name must be unique in the account that creates the bot.

  • :description (String)

    A description of the bot.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.

  • :data_privacy (required, Types::DataPrivacy)

    Provides information on additional privacy protections Amazon Lex should use with the bot's data.

  • :idle_session_ttl_in_seconds (required, Integer)

    The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.

    A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.

    You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.

Returns:

See Also:



4400
4401
4402
4403
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4400

def update_bot(params = {}, options = {})
  req = build_request(:update_bot, params)
  req.send_request(options)
end

#update_bot_alias(params = {}) ⇒ Types::UpdateBotAliasResponse

Updates the configuration of an existing bot alias.

Examples:

Request syntax with placeholder values


resp = client.update_bot_alias({
  bot_alias_id: "BotAliasId", # required
  bot_alias_name: "Name", # required
  description: "Description",
  bot_version: "BotVersion",
  bot_alias_locale_settings: {
    "LocaleId" => {
      enabled: false, # required
      code_hook_specification: {
        lambda_code_hook: { # required
          lambda_arn: "LambdaARN", # required
          code_hook_interface_version: "CodeHookInterfaceVersion", # required
        },
      },
    },
  },
  conversation_log_settings: {
    text_log_settings: [
      {
        enabled: false, # required
        destination: { # required
          cloud_watch: { # required
            cloud_watch_log_group_arn: "CloudWatchLogGroupArn", # required
            log_prefix: "LogPrefix", # required
          },
        },
      },
    ],
    audio_log_settings: [
      {
        enabled: false, # required
        destination: { # required
          s3_bucket: { # required
            kms_key_arn: "KmsKeyArn",
            s3_bucket_arn: "S3BucketArn", # required
            log_prefix: "LogPrefix", # required
          },
        },
      },
    ],
  },
  sentiment_analysis_settings: {
    detect_sentiment: false, # required
  },
  bot_id: "Id", # required
})

Response structure


resp.bot_alias_id #=> String
resp.bot_alias_name #=> String
resp.description #=> String
resp.bot_version #=> String
resp.bot_alias_locale_settings #=> Hash
resp.bot_alias_locale_settings["LocaleId"].enabled #=> Boolean
resp.bot_alias_locale_settings["LocaleId"].code_hook_specification.lambda_code_hook.lambda_arn #=> String
resp.bot_alias_locale_settings["LocaleId"].code_hook_specification.lambda_code_hook.code_hook_interface_version #=> String
resp.conversation_log_settings.text_log_settings #=> Array
resp.conversation_log_settings.text_log_settings[0].enabled #=> Boolean
resp.conversation_log_settings.text_log_settings[0].destination.cloud_watch.cloud_watch_log_group_arn #=> String
resp.conversation_log_settings.text_log_settings[0].destination.cloud_watch.log_prefix #=> String
resp.conversation_log_settings.audio_log_settings #=> Array
resp.conversation_log_settings.audio_log_settings[0].enabled #=> Boolean
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.kms_key_arn #=> String
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.s3_bucket_arn #=> String
resp.conversation_log_settings.audio_log_settings[0].destination.s3_bucket.log_prefix #=> String
resp.sentiment_analysis_settings.detect_sentiment #=> Boolean
resp.bot_alias_status #=> String, one of "Creating", "Available", "Deleting", "Failed"
resp.bot_id #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_alias_id (required, String)

    The unique identifier of the bot alias.

  • :bot_alias_name (required, String)

    The new name to assign to the bot alias.

  • :description (String)

    The new description to assign to the bot alias.

  • :bot_version (String)

    The new bot version to assign to the bot alias.

  • :bot_alias_locale_settings (Hash<String,Types::BotAliasLocaleSettings>)

    The new Lambda functions to use in each locale for the bot alias.

  • :conversation_log_settings (Types::ConversationLogSettings)

    The new settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.

  • :sentiment_analysis_settings (Types::SentimentAnalysisSettings)

    Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.

  • :bot_id (required, String)

    The identifier of the bot with the updated alias.

Returns:

See Also:



4525
4526
4527
4528
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4525

def update_bot_alias(params = {}, options = {})
  req = build_request(:update_bot_alias, params)
  req.send_request(options)
end

#update_bot_locale(params = {}) ⇒ Types::UpdateBotLocaleResponse

Updates the settings that a bot has for a specific locale.

Examples:

Request syntax with placeholder values


resp = client.update_bot_locale({
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
  description: "Description",
  nlu_intent_confidence_threshold: 1.0, # required
  voice_settings: {
    voice_id: "VoiceId", # required
  },
})

Response structure


resp.bot_id #=> String
resp.bot_version #=> String
resp.locale_id #=> String
resp.locale_name #=> String
resp.description #=> String
resp.nlu_intent_confidence_threshold #=> Float
resp.voice_settings.voice_id #=> String
resp.bot_locale_status #=> String, one of "Creating", "Building", "Built", "ReadyExpressTesting", "Failed", "Deleting", "NotBuilt", "Importing"
resp.failure_reasons #=> Array
resp.failure_reasons[0] #=> String
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :bot_id (required, String)

    The unique identifier of the bot that contains the locale.

  • :bot_version (required, String)

    The version of the bot that contains the locale to be updated. The version can only be the DRAFT version.

  • :locale_id (required, String)

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

  • :description (String)

    The new description of the locale.

  • :nlu_intent_confidence_threshold (required, Float)

    The new confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.

  • :voice_settings (Types::VoiceSettings)

    The new Amazon Polly voice Amazon Lex should use for voice interaction with the user.

Returns:

See Also:



4606
4607
4608
4609
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4606

def update_bot_locale(params = {}, options = {})
  req = build_request(:update_bot_locale, params)
  req.send_request(options)
end

#update_export(params = {}) ⇒ Types::UpdateExportResponse

Updates the password used to protect an export zip archive.

The password is not required. If you don't supply a password, Amazon Lex generates a zip file that is not protected by a password. This is the archive that is available at the pre-signed S3 URL provided by the operation.

Examples:

Request syntax with placeholder values


resp = client.update_export({
  export_id: "Id", # required
  file_password: "ImportExportFilePassword",
})

Response structure


resp.export_id #=> String
resp.resource_specification.bot_export_specification.bot_id #=> String
resp.resource_specification.bot_export_specification.bot_version #=> String
resp.resource_specification.bot_locale_export_specification.bot_id #=> String
resp.resource_specification.bot_locale_export_specification.bot_version #=> String
resp.resource_specification.bot_locale_export_specification.locale_id #=> String
resp.file_format #=> String, one of "LexJson"
resp.export_status #=> String, one of "InProgress", "Completed", "Failed", "Deleting"
resp.creation_date_time #=> Time
resp.last_updated_date_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :export_id (required, String)

    The unique identifier Amazon Lex assigned to the export.

  • :file_password (String)

    The new password to use to encrypt the export zip archive.

Returns:

See Also:



4657
4658
4659
4660
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/client.rb', line 4657

def update_export(params = {}, options = {})
  req = build_request(:update_export, params)
  req.send_request(options)
end

#update_intent(params = {}) ⇒ Types::UpdateIntentResponse

Updates the settings for an intent.

Examples:

Request syntax with placeholder values


resp = client.update_intent({
  intent_id: "Id", # required
  intent_name: "Name", # required
  description: "Description",
  parent_intent_signature: "IntentSignature",
  sample_utterances: [
    {
      utterance: "Utterance", # required
    },
  ],
  dialog_code_hook: {
    enabled: false, # required
  },
  fulfillment_code_hook: {
    enabled: false, # required
  },
  slot_priorities: [
    {
      priority: 1, # required
      slot_id: "Id", # required
    },
  ],
  intent_confirmation_setting: {
    prompt_specification: { # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      max_retries: 1, # required
      allow_interrupt: false,
    },
    declination_response: { # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
  },
  intent_closing_setting: {
    closing_response: { # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
  },
  input_contexts: [
    {
      name: "Name", # required
    },
  ],
  output_contexts: [
    {
      name: "Name", # required
      time_to_live_in_seconds: 1, # required
      turns_to_live: 1, # required
    },
  ],
  kendra_configuration: {
    kendra_index: "KendraIndexArn", # required
    query_filter_string_enabled: false,
    query_filter_string: "QueryFilterString",
  },
  bot_id: "Id", # required
  bot_version: "DraftBotVersion", # required
  locale_id: "LocaleId", # required
})

Response structure


resp.intent_id #=> String
resp.intent_name #=> String
resp.description #=> String
resp.parent_intent_signature #=> String
resp.sample_utterances #=> Array
resp.sample_utterances[0].utterance #=> String
resp.dialog_code_hook.enabled #=> Boolean
resp.fulfillment_code_hook.enabled #=> Boolean
resp.slot_priorities #=> Array
resp.slot_priorities[0]