AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the PostText operation. Sends user input (text-only) to Amazon Lex. Client applications can use this API to send requests to Amazon Lex at runtime. Amazon Lex then interprets the user input using the machine learning model it built for the bot.

In response, Amazon Lex returns the next message to convey to the user an optional responseCard to display. Consider the following example messages:

Not all Amazon Lex messages require a user response. For example, a conclusion statement does not require a response. Some messages require only a "yes" or "no" user response. In addition to the message, Amazon Lex provides additional context about the message in the response that you might use to enhance client behavior, for example, to display the appropriate client user interface. These are the slotToElicit, dialogState, intentName, and slots fields in the response. Consider the following examples:

In addition, Amazon Lex also returns your application-specific sessionAttributes. For more information, see Managing Conversation Context.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Lex.AmazonLexRequest
      Amazon.Lex.Model.PostTextRequest

Namespace: Amazon.Lex.Model
Assembly: AWSSDK.Lex.dll
Version: 3.x.y.z

Syntax

C#
public class PostTextRequest : AmazonLexRequest
         IAmazonWebServiceRequest

The PostTextRequest type exposes the following members

Constructors

NameDescription
Public Method PostTextRequest()

Properties

NameTypeDescription
Public Property BotAlias System.String

Gets and sets the property BotAlias.

The alias of the Amazon Lex bot.

Public Property BotName System.String

Gets and sets the property BotName.

The name of the Amazon Lex bot.

Public Property InputText System.String

Gets and sets the property InputText.

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

Public Property RequestAttributes System.Collections.Generic.Dictionary<System.String, System.String>

Gets and sets the property RequestAttributes.

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.

Public Property SessionAttributes System.Collections.Generic.Dictionary<System.String, System.String>

Gets and sets the property SessionAttributes.

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

For more information, see Setting Session Attributes.

Public Property UserId System.String

Gets and sets the property UserId.

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.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms