Paws::LexRuntime::PostText - Arguments for method PostText on Paws::LexRuntime


This class represents the parameters used for calling the method PostText on the Amazon Lex Runtime Service service. Use the attributes of this class as arguments to method PostText.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PostText.


    my $runtime.lex = Paws->service('LexRuntime');
    my $PostTextResponse = $runtime . lex->PostText(
      BotAlias          => 'MyBotAlias',
      BotName           => 'MyBotName',
      InputText         => 'MyText',
      UserId            => 'MyUserId',
      RequestAttributes => { 'MyString' => 'MyString', },    # OPTIONAL
      SessionAttributes => { 'MyString' => 'MyString', },    # OPTIONAL

    # Results:
    my $DialogState       = $PostTextResponse->DialogState;
    my $IntentName        = $PostTextResponse->IntentName;
    my $Message           = $PostTextResponse->Message;
    my $MessageFormat     = $PostTextResponse->MessageFormat;
    my $ResponseCard      = $PostTextResponse->ResponseCard;
    my $SessionAttributes = $PostTextResponse->SessionAttributes;
    my $SlotToElicit      = $PostTextResponse->SlotToElicit;
    my $Slots             = $PostTextResponse->Slots;

    # Returns a L<Paws::LexRuntime::PostTextResponse> object.

Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see


REQUIRED BotAlias => Str

The alias of the Amazon Lex bot.

REQUIRED BotName => Str

The name of the Amazon Lex bot.

REQUIRED InputText => Str

The text that the user entered (Amazon Lex interprets this text).

RequestAttributes => Paws::LexRuntime::StringMap

Request-specific information passed between Amazon Lex and a client application.

The namespace x-amz-lex: is reserved for special attributes. Don't create any request attributes with the prefix x-amz-lex:.

For more information, see Setting Request Attributes (

SessionAttributes => Paws::LexRuntime::StringMap

Application-specific information passed between Amazon Lex and a client application.

For more information, see Setting Session Attributes (

REQUIRED UserId => Str

The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the userID field.

To decide the user ID to use for your application, consider the following factors.

  • The userID field must not contain any personally identifiable information of the user, for example, name, personal identification numbers, or other end user personal information.

  • If you want a user to start a conversation on one device and continue on another device, use a user-specific identifier.

  • If you want the same user to be able to have two independent conversations on two different devices, choose a device-specific identifier.

  • A user can't have two independent conversations with two different versions of the same bot. For example, a user can't have a conversation with the PROD and BETA versions of the same bot. If you anticipate that a user will need to have conversation with two different versions, for example, while testing, include the bot alias in the user ID to separate the two conversations.


This class forms part of Paws, documenting arguments for method PostText in Paws::LexRuntime


The source code is located here:

Please report bugs to: