Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Amazon Lex provides both build and runtime endpoints. Each endpoint provides a set of operations (API). Your conversational bot uses the runtime API to understand user utterances (user input text or voice). For example, suppose a user says "I want pizza", your bot sends this input to Amazon Lex using the runtime API. Amazon Lex recognizes that the user request is for the OrderPizza intent (one of the intents defined in the bot). Then Amazon Lex engages in user conversation on behalf of the bot to elicit required information (slot values, such as pizza size and crust type), and then performs fulfillment activity (that you configured when you created the bot). You use the build-time API to create and manage your Amazon Lex bot. For a list of build-time operations, see the build-time API, .
Synopsis
- lexRuntime :: Service
- _NotAcceptableException :: AsError a => Getting (First ServiceError) a ServiceError
- _DependencyFailedException :: AsError a => Getting (First ServiceError) a ServiceError
- _UnsupportedMediaTypeException :: AsError a => Getting (First ServiceError) a ServiceError
- _ConflictException :: AsError a => Getting (First ServiceError) a ServiceError
- _NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _RequestTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError
- _LoopDetectedException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError
- _BadGatewayException :: AsError a => Getting (First ServiceError) a ServiceError
- _BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError
- _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- module Network.AWS.LexRuntime.PostText
- module Network.AWS.LexRuntime.PostContent
- data ContentType = ApplicationVnd_Amazonaws_Card_Generic
- data DialogState
- data MessageFormatType
- data Button
- button :: Text -> Text -> Button
- bText :: Lens' Button Text
- bValue :: Lens' Button Text
- data GenericAttachment
- genericAttachment :: GenericAttachment
- gaButtons :: Lens' GenericAttachment [Button]
- gaSubTitle :: Lens' GenericAttachment (Maybe Text)
- gaImageURL :: Lens' GenericAttachment (Maybe Text)
- gaAttachmentLinkURL :: Lens' GenericAttachment (Maybe Text)
- gaTitle :: Lens' GenericAttachment (Maybe Text)
- data ResponseCard
- responseCard :: ResponseCard
- rcGenericAttachments :: Lens' ResponseCard [GenericAttachment]
- rcVersion :: Lens' ResponseCard (Maybe Text)
- rcContentType :: Lens' ResponseCard (Maybe ContentType)
Service Configuration
lexRuntime :: Service Source #
API version 2016-11-28
of the Amazon Lex Runtime Service SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by LexRuntime
.
NotAcceptableException
_NotAcceptableException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The accept header in the request does not have a valid value.
DependencyFailedException
_DependencyFailedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception. For example,
- If Amazon Lex does not have sufficient permissions to call a Lambda function.
- If a Lambda function takes longer than 30 seconds to execute.
- If a fulfillment Lambda function returns a
Delegate
dialog action without removing any slot values.
UnsupportedMediaTypeException
_UnsupportedMediaTypeException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The Content-Type header (PostContent
API) has an invalid value.
ConflictException
_ConflictException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Two clients are using the same AWS account, Amazon Lex bot, and user ID.
NotFoundException
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The resource (such as the Amazon Lex bot or an alias) that is referred to is not found.
RequestTimeoutException
_RequestTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The input speech is too long.
LoopDetectedException
_LoopDetectedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
This exception is not used.
InternalFailureException
_InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Internal service error. Retry the call.
BadGatewayException
_BadGatewayException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Either the Amazon Lex bot is still building, or one of the dependent services (Amazon Polly, AWS Lambda) failed with an internal service error.
BadRequestException
_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Request validation failed, there is no usable message in the context, or the bot build failed, is still in progress, or contains unbuilt changes.
LimitExceededException
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Exceeded a limit.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
PostText
PostContent
Types
ContentType
data ContentType Source #
Instances
DialogState
data DialogState Source #
Instances
MessageFormatType
data MessageFormatType Source #
Instances
Button
Represents an option to be shown on the client platform (Facebook, Slack, etc.)
See: button
smart constructor.
Instances
Eq Button Source # | |
Data Button Source # | |
Defined in Network.AWS.LexRuntime.Types.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Button -> c Button # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Button # toConstr :: Button -> Constr # dataTypeOf :: Button -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Button) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Button) # gmapT :: (forall b. Data b => b -> b) -> Button -> Button # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Button -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Button -> r # gmapQ :: (forall d. Data d => d -> u) -> Button -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Button -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Button -> m Button # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Button -> m Button # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Button -> m Button # | |
Read Button Source # | |
Show Button Source # | |
Generic Button Source # | |
Hashable Button Source # | |
Defined in Network.AWS.LexRuntime.Types.Product | |
FromJSON Button Source # | |
NFData Button Source # | |
Defined in Network.AWS.LexRuntime.Types.Product | |
type Rep Button Source # | |
Defined in Network.AWS.LexRuntime.Types.Product type Rep Button = D1 (MetaData "Button" "Network.AWS.LexRuntime.Types.Product" "amazonka-lex-runtime-1.6.1-Hd9cm3dncWCDjYObOvteWj" False) (C1 (MetaCons "Button'" PrefixI True) (S1 (MetaSel (Just "_bText") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_bValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) |
Creates a value of Button
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
bValue :: Lens' Button Text Source #
The value sent to Amazon Lex when a user chooses the button. For example, consider button text "NYC." When the user chooses the button, the value sent can be "New York City."
GenericAttachment
data GenericAttachment Source #
Represents an option rendered to the user when a prompt is shown. It could be an image, a button, a link, or text.
See: genericAttachment
smart constructor.
Instances
genericAttachment :: GenericAttachment Source #
Creates a value of GenericAttachment
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gaButtons
- The list of options to show to the user.gaSubTitle
- The subtitle shown below the title.gaImageURL
- The URL of an image that is displayed to the user.gaAttachmentLinkURL
- The URL of an attachment to the response card.gaTitle
- The title of the option.
gaSubTitle :: Lens' GenericAttachment (Maybe Text) Source #
The subtitle shown below the title.
gaImageURL :: Lens' GenericAttachment (Maybe Text) Source #
The URL of an image that is displayed to the user.
gaAttachmentLinkURL :: Lens' GenericAttachment (Maybe Text) Source #
The URL of an attachment to the response card.
ResponseCard
data ResponseCard Source #
If you configure a response card when creating your bots, Amazon Lex substitutes the session attributes and slot values that are available, and then returns it. The response card can also come from a Lambda function ( dialogCodeHook
and fulfillmentActivity
on an intent).
See: responseCard
smart constructor.
Instances
responseCard :: ResponseCard Source #
Creates a value of ResponseCard
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rcGenericAttachments
- An array of attachment objects representing options.rcVersion
- The version of the response card format.rcContentType
- The content type of the response.
rcGenericAttachments :: Lens' ResponseCard [GenericAttachment] Source #
An array of attachment objects representing options.
rcContentType :: Lens' ResponseCard (Maybe ContentType) Source #
The content type of the response.