JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.793

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.services.lexruntimev2

Interface AmazonLexRuntimeV2

    • Method Detail

      • deleteSession

        DeleteSessionResult deleteSession(DeleteSessionRequest deleteSessionRequest)

        Removes session information for a specified bot, alias, and user ID.

        You can use this operation to restart a conversation with a bot. When you remove a session, the entire history of the session is removed so that you can start again.

        You don't need to delete a session. Sessions have a time limit and will expire. Set the session time limit when you create the bot. The default is 5 minutes, but you can specify anything between 1 minute and 24 hours.

        If you specify a bot or alias ID that doesn't exist, you receive a BadRequestException.

        If the locale doesn't exist in the bot, or if the locale hasn't been enables for the alias, you receive a BadRequestException.

        Parameters:
        deleteSessionRequest -
        Returns:
        Result of the DeleteSession operation returned by the service.
        Throws:
        AccessDeniedException
        ResourceNotFoundException
        ValidationException
        ThrottlingException
        InternalServerException
        ConflictException
        See Also:
        AWS API Documentation
      • recognizeText

        RecognizeTextResult recognizeText(RecognizeTextRequest recognizeTextRequest)

        Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot.

        In response, Amazon Lex V2 returns the next message to convey to the user and an optional response card to display.

        If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see PostFulfillmentStatusSpecification.

        • Success message - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.

        • Failed message - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.

        • Timeout message - If you don't configure a timeout message and a timeout, and the Lambda function doesn't return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out.

        For more information, see Completion message.

        Parameters:
        recognizeTextRequest -
        Returns:
        Result of the RecognizeText operation returned by the service.
        Throws:
        AccessDeniedException
        ResourceNotFoundException
        ValidationException
        ThrottlingException
        InternalServerException
        ConflictException
        DependencyFailedException
        BadGatewayException
        See Also:
        AWS API Documentation
      • recognizeUtterance

        RecognizeUtteranceResult recognizeUtterance(RecognizeUtteranceRequest recognizeUtteranceRequest)

        Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets the user input using the machine learning model built for the bot.

        The following request fields must be compressed with gzip and then base64 encoded before you send them to Amazon Lex V2.

        • requestAttributes

        • sessionState

        The following response fields are compressed using gzip and then base64 encoded by Amazon Lex V2. Before you can use these fields, you must decode and decompress them.

        • inputTranscript

        • interpretations

        • messages

        • requestAttributes

        • sessionState

        The example contains a Java application that compresses and encodes a Java object to send to Amazon Lex V2, and a second that decodes and decompresses a response from Amazon Lex V2.

        If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see PostFulfillmentStatusSpecification.

        • Success message - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.

        • Failed message - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.

        • Timeout message - If you don't configure a timeout message and a timeout, and the Lambda function doesn't return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out.

        For more information, see Completion message.

        Parameters:
        recognizeUtteranceRequest -
        Returns:
        Result of the RecognizeUtterance operation returned by the service.
        Throws:
        AccessDeniedException
        ResourceNotFoundException
        ValidationException
        ThrottlingException
        InternalServerException
        ConflictException
        DependencyFailedException
        BadGatewayException
        See Also:
        AWS API Documentation
      • shutdown

        void shutdown()
        Shuts down this client object, releasing any resources that might be held open. This is an optional method, and callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client has been shutdown, it should not be used to make any more requests.
      • getCachedResponseMetadata

        ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
        Returns additional metadata for a previously executed successful request, typically used for debugging issues where a service isn't acting as expected. This data isn't considered part of the result data returned by an operation, so it's available through this separate, diagnostic interface.

        Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.

        Parameters:
        request - The originally executed request.
        Returns:
        The response metadata for the specified request, or null if none is available.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /