AWS Tools for Windows PowerShell
Command 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.

Synopsis

Calls the Amazon Lex Model Building Service PutIntent API operation.

Syntax

Write-LMBIntent
-Name <String>
-Checksum <String>
-ConclusionStatement <Statement>
-CreateVersion <Boolean>
-Description <String>
-InputContext <InputContext[]>
-KendraConfiguration_KendraIndex <String>
-ConfirmationPrompt_MaxAttempt <Int32>
-Prompt_MaxAttempt <Int32>
-ConfirmationPrompt_Message <Message[]>
-Prompt_Message <Message[]>
-DialogCodeHook_MessageVersion <String>
-CodeHook_MessageVersion <String>
-OutputContext <OutputContext[]>
-ParentIntentSignature <String>
-KendraConfiguration_QueryFilterString <String>
-FollowUpPrompt_RejectionStatement <Statement>
-RejectionStatement <Statement>
-ConfirmationPrompt_ResponseCard <String>
-Prompt_ResponseCard <String>
-KendraConfiguration_Role <String>
-SampleUtterance <String[]>
-Slot <Slot[]>
-FulfillmentActivity_Type <FulfillmentActivityType>
-DialogCodeHook_Uri <String>
-CodeHook_Uri <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonLexModelBuildingServiceConfig>

Description

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.

Parameters

-Checksum <String>
Identifies a specific revision of the $LATEST version.When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception.When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
Amazon.PowerShell.Cmdlets.LMB.AmazonLexModelBuildingServiceClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CodeHook_MessageVersion <String>
The version of the request-response that you want Amazon Lex to use to invoke your Lambda function. For more information, see using-lambda.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFulfillmentActivity_CodeHook_MessageVersion
-CodeHook_Uri <String>
The Amazon Resource Name (ARN) of the Lambda function.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFulfillmentActivity_CodeHook_Uri
-ConclusionStatement <Statement>
The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function. This element is relevant only if you provide a Lambda function in the fulfillmentActivity. If you return the intent to the client application, you can't specify this element.The followUpPrompt and conclusionStatement are mutually exclusive. You can specify only one.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ConfirmationPrompt_MaxAttempt <Int32>
The number of times to prompt the user for information.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesConfirmationPrompt_MaxAttempts
-ConfirmationPrompt_Message <Message[]>
An array of objects, each of which provides a message string and its type. You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesConfirmationPrompt_Messages
-ConfirmationPrompt_ResponseCard <String>
A response card. Amazon Lex uses this prompt at runtime, in the PostText API response. It substitutes session attributes and slot values for placeholders in the response card. For more information, see ex-resp-card.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CreateVersion <Boolean>
When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
A description of the intent.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DialogCodeHook_MessageVersion <String>
The version of the request-response that you want Amazon Lex to use to invoke your Lambda function. For more information, see using-lambda.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DialogCodeHook_Uri <String>
The Amazon Resource Name (ARN) of the Lambda function.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FollowUpPrompt_RejectionStatement <Statement>
If the user answers "no" to the question defined in the prompt field, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FulfillmentActivity_Type <FulfillmentActivityType>
How the intent should be fulfilled, either by running a Lambda function or by returning the slot data to the client application.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InputContext <InputContext[]>
An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInputContexts
-KendraConfiguration_KendraIndex <String>
The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot. If the Amazon Kendra index does not exist, you get an exception when you call the PutIntent operation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-KendraConfiguration_QueryFilterString <String>
A query filter that Amazon Lex sends to Amazon Kendra to filter the response from the query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries.You can override this filter string with a new filter string at runtime.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-KendraConfiguration_Role <String>
The Amazon Resource Name (ARN) of an IAM role that has permission to search the Amazon Kendra index. The role must be in the same account and Region as the Amazon Lex bot. If the role does not exist, you get an exception when you call the PutIntent operation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Name <String>
The name of the intent. The name is not case sensitive. The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent.For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-OutputContext <OutputContext[]>
An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOutputContexts
-ParentIntentSignature <String>
A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the Name parameter. The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Prompt_MaxAttempt <Int32>
The number of times to prompt the user for information.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFollowUpPrompt_Prompt_MaxAttempts
-Prompt_Message <Message[]>
An array of objects, each of which provides a message string and its type. You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFollowUpPrompt_Prompt_Messages
-Prompt_ResponseCard <String>
A response card. Amazon Lex uses this prompt at runtime, in the PostText API response. It substitutes session attributes and slot values for placeholders in the response card. For more information, see ex-resp-card.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFollowUpPrompt_Prompt_ResponseCard
-RejectionStatement <Statement>
When the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled. You must provide both the rejectionStatement and the confirmationPrompt, or neither.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SampleUtterance <String[]>
An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas". In each utterance, a slot name is enclosed in curly braces.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSampleUtterances
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.LexModelBuildingService.Model.PutIntentResponse). Specifying the name of a property of type Amazon.LexModelBuildingService.Model.PutIntentResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Slot <Slot[]>
An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSlots

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.LexModelBuildingService.Model.PutIntentResponse object containing multiple properties. The object can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z