interface SlotTypeProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lex.CfnBot.SlotTypeProperty |
Java | software.amazon.awscdk.services.lex.CfnBot.SlotTypeProperty |
Python | aws_cdk.aws_lex.CfnBot.SlotTypeProperty |
TypeScript | @aws-cdk/aws-lex » CfnBot » SlotTypeProperty |
Describes a slot type.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as lex from '@aws-cdk/aws-lex';
const slotTypeProperty: lex.CfnBot.SlotTypeProperty = {
name: 'name',
// the properties below are optional
description: 'description',
externalSourceSetting: {
grammarSlotTypeSetting: {
source: {
s3BucketName: 's3BucketName',
s3ObjectKey: 's3ObjectKey',
// the properties below are optional
kmsKeyArn: 'kmsKeyArn',
},
},
},
parentSlotTypeSignature: 'parentSlotTypeSignature',
slotTypeValues: [{
sampleValue: {
value: 'value',
},
// the properties below are optional
synonyms: [{
value: 'value',
}],
}],
valueSelectionSetting: {
resolutionStrategy: 'resolutionStrategy',
// the properties below are optional
advancedRecognitionSetting: {
audioRecognitionStrategy: 'audioRecognitionStrategy',
},
regexFilter: {
pattern: 'pattern',
},
},
};
Properties
Name | Type | Description |
---|---|---|
name | string | The name of the slot type. |
description? | string | A description of the slot type. |
external | IResolvable | External | Sets the type of external information used to create the slot type. |
parent | string | The built-in slot type used as a parent of this slot type. |
slot | IResolvable | IResolvable | Slot [] | A list of SlotTypeValue objects that defines the values that the slot type can take. |
value | IResolvable | Slot | Determines the slot resolution strategy that Amazon Lex uses to return slot type values. |
name
Type:
string
The name of the slot type.
A slot type name must be unique withing the account.
description?
Type:
string
(optional)
A description of the slot type.
Use the description to help identify the slot type in lists.
externalSourceSetting?
Type:
IResolvable
|
External
(optional)
Sets the type of external information used to create the slot type.
parentSlotTypeSignature?
Type:
string
(optional)
The built-in slot type used as a parent of this slot type.
When you define a parent slot type, the new slot type has the configuration of the parent lot type.
Only AMAZON.AlphaNumeric
is supported.
slotTypeValues?
Type:
IResolvable
|
IResolvable
|
Slot
[]
(optional)
A list of SlotTypeValue objects that defines the values that the slot type can take.
Each value can have a list of synonyms, additional values that help train the machine learning model about the values that it resolves for the slot.
valueSelectionSetting?
Type:
IResolvable
|
Slot
(optional)
Determines the slot resolution strategy that Amazon Lex uses to return slot type values.
The field can be set to one of the following values:
ORIGINAL_VALUE
- Returns the value entered by the user, if the user value is similar to the slot value.TOP_RESOLUTION
- If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the valueSelectionStrategy
, the default is ORIGINAL_VALUE
.