SlotTypeProperty Struct
Describes a slot type.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';
const slotTypeProperty: lex.CfnBot.SlotTypeProperty = {
name: 'name',
// the properties below are optional
compositeSlotTypeSetting: {
subSlots: [{
name: 'name',
// the properties below are optional
slotTypeId: 'slotTypeId',
slotTypeName: 'slotTypeName',
}],
},
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',
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lex as lex
slot_type_property = lex.CfnBot.SlotTypeProperty(
name="name",
# the properties below are optional
composite_slot_type_setting=lex.CfnBot.CompositeSlotTypeSettingProperty(
sub_slots=[lex.CfnBot.SubSlotTypeCompositionProperty(
name="name",
# the properties below are optional
slot_type_id="slotTypeId",
slot_type_name="slotTypeName"
)]
),
description="description",
external_source_setting=lex.CfnBot.ExternalSourceSettingProperty(
grammar_slot_type_setting=lex.CfnBot.GrammarSlotTypeSettingProperty(
source=lex.CfnBot.GrammarSlotTypeSourceProperty(
s3_bucket_name="s3BucketName",
s3_object_key="s3ObjectKey",
# the properties below are optional
kms_key_arn="kmsKeyArn"
)
)
),
parent_slot_type_signature="parentSlotTypeSignature",
slot_type_values=[lex.CfnBot.SlotTypeValueProperty(
sample_value=lex.CfnBot.SampleValueProperty(
value="value"
),
# the properties below are optional
synonyms=[lex.CfnBot.SampleValueProperty(
value="value"
)]
)],
value_selection_setting=lex.CfnBot.SlotValueSelectionSettingProperty(
resolution_strategy="resolutionStrategy",
# the properties below are optional
advanced_recognition_setting=lex.CfnBot.AdvancedRecognitionSettingProperty(
audio_recognition_strategy="audioRecognitionStrategy"
),
regex_filter=lex.CfnBot.SlotValueRegexFilterProperty(
pattern="pattern"
)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lex.*;
SlotTypeProperty slotTypeProperty = SlotTypeProperty.builder()
.name("name")
// the properties below are optional
.compositeSlotTypeSetting(CompositeSlotTypeSettingProperty.builder()
.subSlots(List.of(SubSlotTypeCompositionProperty.builder()
.name("name")
// the properties below are optional
.slotTypeId("slotTypeId")
.slotTypeName("slotTypeName")
.build()))
.build())
.description("description")
.externalSourceSetting(ExternalSourceSettingProperty.builder()
.grammarSlotTypeSetting(GrammarSlotTypeSettingProperty.builder()
.source(GrammarSlotTypeSourceProperty.builder()
.s3BucketName("s3BucketName")
.s3ObjectKey("s3ObjectKey")
// the properties below are optional
.kmsKeyArn("kmsKeyArn")
.build())
.build())
.build())
.parentSlotTypeSignature("parentSlotTypeSignature")
.slotTypeValues(List.of(SlotTypeValueProperty.builder()
.sampleValue(SampleValueProperty.builder()
.value("value")
.build())
// the properties below are optional
.synonyms(List.of(SampleValueProperty.builder()
.value("value")
.build()))
.build()))
.valueSelectionSetting(SlotValueSelectionSettingProperty.builder()
.resolutionStrategy("resolutionStrategy")
// the properties below are optional
.advancedRecognitionSetting(AdvancedRecognitionSettingProperty.builder()
.audioRecognitionStrategy("audioRecognitionStrategy")
.build())
.regexFilter(SlotValueRegexFilterProperty.builder()
.pattern("pattern")
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lex;
var slotTypeProperty = new SlotTypeProperty {
Name = "name",
// the properties below are optional
CompositeSlotTypeSetting = new CompositeSlotTypeSettingProperty {
SubSlots = new [] { new SubSlotTypeCompositionProperty {
Name = "name",
// the properties below are optional
SlotTypeId = "slotTypeId",
SlotTypeName = "slotTypeName"
} }
},
Description = "description",
ExternalSourceSetting = new ExternalSourceSettingProperty {
GrammarSlotTypeSetting = new GrammarSlotTypeSettingProperty {
Source = new GrammarSlotTypeSourceProperty {
S3BucketName = "s3BucketName",
S3ObjectKey = "s3ObjectKey",
// the properties below are optional
KmsKeyArn = "kmsKeyArn"
}
}
},
ParentSlotTypeSignature = "parentSlotTypeSignature",
SlotTypeValues = new [] { new SlotTypeValueProperty {
SampleValue = new SampleValueProperty {
Value = "value"
},
// the properties below are optional
Synonyms = new [] { new SampleValueProperty {
Value = "value"
} }
} },
ValueSelectionSetting = new SlotValueSelectionSettingProperty {
ResolutionStrategy = "resolutionStrategy",
// the properties below are optional
AdvancedRecognitionSetting = new AdvancedRecognitionSettingProperty {
AudioRecognitionStrategy = "audioRecognitionStrategy"
},
RegexFilter = new SlotValueRegexFilterProperty {
Pattern = "pattern"
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
slotTypeProperty := &SlotTypeProperty{
Name: jsii.String("name"),
// the properties below are optional
CompositeSlotTypeSetting: &CompositeSlotTypeSettingProperty{
SubSlots: []interface{}{
&SubSlotTypeCompositionProperty{
Name: jsii.String("name"),
// the properties below are optional
SlotTypeId: jsii.String("slotTypeId"),
SlotTypeName: jsii.String("slotTypeName"),
},
},
},
Description: jsii.String("description"),
ExternalSourceSetting: &ExternalSourceSettingProperty{
GrammarSlotTypeSetting: &GrammarSlotTypeSettingProperty{
Source: &GrammarSlotTypeSourceProperty{
S3BucketName: jsii.String("s3BucketName"),
S3ObjectKey: jsii.String("s3ObjectKey"),
// the properties below are optional
KmsKeyArn: jsii.String("kmsKeyArn"),
},
},
},
ParentSlotTypeSignature: jsii.String("parentSlotTypeSignature"),
SlotTypeValues: []interface{}{
&SlotTypeValueProperty{
SampleValue: &SampleValueProperty{
Value: jsii.String("value"),
},
// the properties below are optional
Synonyms: []interface{}{
&SampleValueProperty{
Value: jsii.String("value"),
},
},
},
},
ValueSelectionSetting: &SlotValueSelectionSettingProperty{
ResolutionStrategy: jsii.String("resolutionStrategy"),
// the properties below are optional
AdvancedRecognitionSetting: &AdvancedRecognitionSettingProperty{
AudioRecognitionStrategy: jsii.String("audioRecognitionStrategy"),
},
RegexFilter: &SlotValueRegexFilterProperty{
Pattern: jsii.String("pattern"),
},
},
}
Properties
compositeSlotTypeSettingoptionalIResolvable | CfnBot.CompositeSlotTypeSettingPropertycomposite_slot_type_settingoptionaltyping.Union[IResolvable, CompositeSlotTypeSettingProperty]compositeSlotTypeSettingoptionalIResolvableCompositeSlotTypeSettingoptionalIResolvableCompositeSlotTypeSettingoptionalinterface{}#descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#A description of the slot type.
Use the description to help identify the slot type in lists.
externalSourceSettingoptionalIResolvable | CfnBot.ExternalSourceSettingPropertyexternal_source_settingoptionaltyping.Union[IResolvable, ExternalSourceSettingProperty]externalSourceSettingoptionalIResolvableExternalSourceSettingoptionalIResolvableExternalSourceSettingoptionalinterface{}#Sets the type of external information used to create the slot type.
The name of the slot type.
A slot type name must be unique withing the account.
parentSlotTypeSignatureoptionalstringparent_slot_type_signatureoptionalstrparentSlotTypeSignatureoptionalStringParentSlotTypeSignatureoptionalstringParentSlotTypeSignatureoptional*string#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.
slotTypeValuesoptionalIResolvable | IResolvable | CfnBot.SlotTypeValueProperty[]slot_type_valuesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SlotTypeValueProperty]]]slotTypeValuesoptionalIResolvableSlotTypeValuesoptionalIResolvableSlotTypeValuesoptionalinterface{}#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.
valueSelectionSettingoptionalIResolvable | CfnBot.SlotValueSelectionSettingPropertyvalue_selection_settingoptionaltyping.Union[IResolvable, SlotValueSelectionSettingProperty]valueSelectionSettingoptionalIResolvableValueSelectionSettingoptionalIResolvableValueSelectionSettingoptionalinterface{}#Determines the slot resolution strategy that Amazon Lex uses to return slot type values.
notes
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 .