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.
Creates an intent or replaces an existing intent.
To define the interaction between the user and your bot, you use one or more intents.
For a pizza ordering bot, for example, you would create an OrderPizza
intent.
To create an intent or replace an existing intent, you must provide the following:
Intent name. For example, OrderPizza
.
Sample utterances. For example, "Can I order a pizza, please." and "I want to order a pizza."
Information to be gathered. You specify slot types for the information that your bot will request from the user. You can specify standard slot types, such as a date or a time, or custom slot types such as the size and crust of a pizza.
How the intent will be fulfilled. You can provide a Lambda function or configure the intent to return the intent information to the client application. If you use a Lambda function, when all of the intent information is available, Amazon Lex invokes your Lambda function. If you configure your intent to return the intent information to the client application.
You can specify other optional information in the request, such as:
A confirmation prompt to ask the user to confirm an intent. For example, "Shall I order your pizza?"
A conclusion statement to send to the user after the intent has been fulfilled. For example, "I placed your pizza order."
A follow-up prompt that asks the user for additional activity. For example, asking "Do you want to order a drink with your pizza?"
If you specify an existing intent name to update the intent, Amazon Lex replaces the
values in the $LATEST
version of the intent with the values in the request.
Amazon Lex removes fields that you don't provide in the request. If you don't specify
the required fields, Amazon Lex throws an exception. When you update the $LATEST
version of an intent, the status
field of any bot that uses the $LATEST
version of the intent is set to NOT_BUILT
.
For more information, see how-it-works.
This operation requires permissions for the lex:PutIntent
action.
This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginPutIntent and EndPutIntent.
Namespace: Amazon.LexModelBuildingService
Assembly: AWSSDK.LexModelBuildingService.dll
Version: 3.x.y.z
public virtual Task<PutIntentResponse> PutIntentAsync( PutIntentRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the PutIntent service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Exception | Condition |
---|---|
BadRequestException | The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again. |
ConflictException | There was a conflict processing the request. Try your request again. |
InternalFailureException | An internal Amazon Lex error occurred. Try your request again. |
LimitExceededException | The request exceeded a limit. Try your request again. |
PreconditionFailedException | The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5