2022/09/09 - Amazon Lex Model Building V2 - 7 updated api methods
{'subSlotSetting': {'expression': 'string', 'slotSpecifications': {'string': {'slotTypeId': 'string', 'valueElicitationSetting': {'defaultValueSpecification': {'defaultValueList': [{'defaultValue': 'string'}]}, 'promptSpecification': {'allowInterrupt': 'boolean', 'maxRetries': 'integer', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}], 'messageSelectionStrategy': 'Random ' '| ' 'Ordered'}, 'sampleUtterances': [{'utterance': 'string'}], 'waitAndContinueSpecification': {'active': 'boolean', 'continueResponse': {'allowInterrupt': 'boolean', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}]}, 'stillWaitingResponse': {'allowInterrupt': 'boolean', 'frequencyInSeconds': 'integer', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}], 'timeoutInSeconds': 'integer'}, 'waitingResponse': {'allowInterrupt': 'boolean', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}]}}}}}}}
Creates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an OrderPizza intent might need slots for size, crust, and number of pizzas. For each slot, you define one or more utterances that Amazon Lex uses to elicit a response from the user.
See also: AWS API Documentation
Request Syntax
# This section is too large to render. # Please see the AWS API Documentation linked below.Parameters
# This section is too large to render. # Please see the AWS API Documentation linked below.
dict
Response Syntax
# This section is too large to render. # Please see the AWS API Documentation linked below.
Response Structure
# This section is too large to render. # Please see the AWS API Documentation linked below.
{'compositeSlotTypeSetting': {'subSlots': [{'name': 'string', 'slotTypeId': 'string'}]}, 'valueSelectionSetting': {'resolutionStrategy': {'Concatenation'}}}
Creates a custom slot type
To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a slot of this type can assume.
See also: AWS API Documentation
Request Syntax
client.create_slot_type( slotTypeName='string', description='string', slotTypeValues=[ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], valueSelectionSetting={ 'resolutionStrategy': 'OriginalValue'|'TopResolution'|'Concatenation', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, parentSlotTypeSignature='string', botId='string', botVersion='string', localeId='string', externalSourceSetting={ 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } }, compositeSlotTypeSetting={ 'subSlots': [ { 'name': 'string', 'slotTypeId': 'string' }, ] } )
string
[REQUIRED]
The name for the slot. A slot type name must be unique within the account.
string
A description of the slot type. Use the description to help identify the slot type in lists.
list
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 a slot.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
dict
Determines the strategy that Amazon Lex uses to select a value from the list of possible values. The field can be set to one of the following values:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - If there is a resolution list for the slot, return the first value in the resolution list. If there is no resolution list, return null.
If you don't specify the valueSelectionSetting parameter, the default is OriginalValue.
resolutionStrategy (string) -- [REQUIRED]
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:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - 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 OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) -- [REQUIRED]
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
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 slot type.
Only AMAZON.AlphaNumeric is supported.
string
[REQUIRED]
The identifier of the bot associated with this slot type.
string
[REQUIRED]
The identifier of the bot version associated with this slot type.
string
[REQUIRED]
The identifier of the language and locale that the slot type will be used in. The string must match one of the supported locales. All of the bots, intents, and slots used by the slot type must have the same locale. For more information, see Supported languages.
dict
Sets the type of external information used to create the slot type.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) -- [REQUIRED]
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) -- [REQUIRED]
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
dict
Specifications for a composite slot type.
subSlots (list) --
Subslots in the composite slot.
(dict) --
Subslot type composition.
name (string) -- [REQUIRED]
Name of a constituent sub slot inside a composite slot.
slotTypeId (string) -- [REQUIRED]
The unique identifier assigned to a slot type. This refers to either a built-in slot type or the unique slotTypeId of a custom slot type.
dict
Response Syntax
{ 'slotTypeId': 'string', 'slotTypeName': 'string', 'description': 'string', 'slotTypeValues': [ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], 'valueSelectionSetting': { 'resolutionStrategy': 'OriginalValue'|'TopResolution'|'Concatenation', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, 'parentSlotTypeSignature': 'string', 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'creationDateTime': datetime(2015, 1, 1), 'externalSourceSetting': { 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } }, 'compositeSlotTypeSetting': { 'subSlots': [ { 'name': 'string', 'slotTypeId': 'string' }, ] } }
Response Structure
(dict) --
slotTypeId (string) --
The unique identifier assigned to the slot type. Use this to identify the slot type in the UpdateSlotType and DeleteSlotType operations.
slotTypeName (string) --
The name specified for the slot type.
description (string) --
The description specified for the slot type.
slotTypeValues (list) --
The list of values that the slot type can assume.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) --
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) --
The value that can be used for a slot type.
valueSelectionSetting (dict) --
The strategy that Amazon Lex uses to select a value from the list of possible values.
resolutionStrategy (string) --
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:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - 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 OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) --
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
parentSlotTypeSignature (string) --
The signature of the base slot type specified for the slot type.
botId (string) --
The identifier for the bot associated with the slot type.
botVersion (string) --
The version of the bot associated with the slot type.
localeId (string) --
The specified language and local specified for the slot type.
creationDateTime (datetime) --
A timestamp of the date and time that the slot type was created.
externalSourceSetting (dict) --
The type of external information used to create the slot type.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) --
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) --
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
compositeSlotTypeSetting (dict) --
Specifications for a composite slot type.
subSlots (list) --
Subslots in the composite slot.
(dict) --
Subslot type composition.
name (string) --
Name of a constituent sub slot inside a composite slot.
slotTypeId (string) --
The unique identifier assigned to a slot type. This refers to either a built-in slot type or the unique slotTypeId of a custom slot type.
{'subSlotSetting': {'expression': 'string', 'slotSpecifications': {'string': {'slotTypeId': 'string', 'valueElicitationSetting': {'defaultValueSpecification': {'defaultValueList': [{'defaultValue': 'string'}]}, 'promptSpecification': {'allowInterrupt': 'boolean', 'maxRetries': 'integer', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}], 'messageSelectionStrategy': 'Random ' '| ' 'Ordered'}, 'sampleUtterances': [{'utterance': 'string'}], 'waitAndContinueSpecification': {'active': 'boolean', 'continueResponse': {'allowInterrupt': 'boolean', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}]}, 'stillWaitingResponse': {'allowInterrupt': 'boolean', 'frequencyInSeconds': 'integer', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}], 'timeoutInSeconds': 'integer'}, 'waitingResponse': {'allowInterrupt': 'boolean', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}]}}}}}}}
Gets metadata information about a slot.
See also: AWS API Documentation
Request Syntax
client.describe_slot( slotId='string', botId='string', botVersion='string', localeId='string', intentId='string' )
string
[REQUIRED]
The unique identifier for the slot.
string
[REQUIRED]
The identifier of the bot associated with the slot.
string
[REQUIRED]
The version of the bot associated with the slot.
string
[REQUIRED]
The identifier of the language and locale of the slot to describe. The string must match one of the supported locales. For more information, see Supported languages.
string
[REQUIRED]
The identifier of the intent that contains the slot.
dict
Response Syntax
# This section is too large to render. # Please see the AWS API Documentation linked below.
Response Structure
# This section is too large to render. # Please see the AWS API Documentation linked below.
{'compositeSlotTypeSetting': {'subSlots': [{'name': 'string', 'slotTypeId': 'string'}]}, 'valueSelectionSetting': {'resolutionStrategy': {'Concatenation'}}}
Gets metadata information about a slot type.
See also: AWS API Documentation
Request Syntax
client.describe_slot_type( slotTypeId='string', botId='string', botVersion='string', localeId='string' )
string
[REQUIRED]
The identifier of the slot type.
string
[REQUIRED]
The identifier of the bot associated with the slot type.
string
[REQUIRED]
The version of the bot associated with the slot type.
string
[REQUIRED]
The identifier of the language and locale of the slot type to describe. The string must match one of the supported locales. For more information, see Supported languages.
dict
Response Syntax
{ 'slotTypeId': 'string', 'slotTypeName': 'string', 'description': 'string', 'slotTypeValues': [ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], 'valueSelectionSetting': { 'resolutionStrategy': 'OriginalValue'|'TopResolution'|'Concatenation', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, 'parentSlotTypeSignature': 'string', 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1), 'externalSourceSetting': { 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } }, 'compositeSlotTypeSetting': { 'subSlots': [ { 'name': 'string', 'slotTypeId': 'string' }, ] } }
Response Structure
(dict) --
slotTypeId (string) --
The unique identifier for the slot type.
slotTypeName (string) --
The name specified for the slot type.
description (string) --
The description specified for the slot type.
slotTypeValues (list) --
The values that the slot type can take. Includes any synonyms for the slot type values.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) --
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) --
The value that can be used for a slot type.
valueSelectionSetting (dict) --
The strategy that Amazon Lex uses to choose a value from a list of possible values.
resolutionStrategy (string) --
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:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - 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 OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) --
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
parentSlotTypeSignature (string) --
The built in slot type used as a parent to this slot type.
botId (string) --
The identifier of the bot associated with the slot type.
botVersion (string) --
The version of the bot associated with the slot type.
localeId (string) --
The language and locale specified for the slot type.
creationDateTime (datetime) --
A timestamp of the date and time that the slot type was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the slot type was last updated.
externalSourceSetting (dict) --
Provides information about the external source of the slot type's definition.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) --
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) --
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
compositeSlotTypeSetting (dict) --
Specifications for a composite slot type.
subSlots (list) --
Subslots in the composite slot.
(dict) --
Subslot type composition.
name (string) --
Name of a constituent sub slot inside a composite slot.
slotTypeId (string) --
The unique identifier assigned to a slot type. This refers to either a built-in slot type or the unique slotTypeId of a custom slot type.
{'slotTypeSummaries': {'slotTypeCategory': {'Composite'}}}
Gets a list of slot types that match the specified criteria.
See also: AWS API Documentation
Request Syntax
client.list_slot_types( botId='string', botVersion='string', localeId='string', sortBy={ 'attribute': 'SlotTypeName'|'LastUpdatedDateTime', 'order': 'Ascending'|'Descending' }, filters=[ { 'name': 'SlotTypeName'|'ExternalSourceType', 'values': [ 'string', ], 'operator': 'CO'|'EQ' }, ], maxResults=123, nextToken='string' )
string
[REQUIRED]
The unique identifier of the bot that contains the slot types.
string
[REQUIRED]
The version of the bot that contains the slot type.
string
[REQUIRED]
The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see Supported languages.
dict
Determines the sort order for the response from the ListSlotTypes operation. You can choose to sort by the slot type name or last updated date in either ascending or descending order.
attribute (string) -- [REQUIRED]
The attribute to use to sort the list of slot types.
order (string) -- [REQUIRED]
The order to sort the list. You can say ascending or descending.
list
Provides the specification of a filter used to limit the slot types in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.
(dict) --
Filters the response from the ListSlotTypes operation.
name (string) -- [REQUIRED]
The name of the field to use for filtering.
values (list) -- [REQUIRED]
The value to use to filter the response.
(string) --
operator (string) -- [REQUIRED]
The operator to use for the filter. Specify EQ when the ListSlotTypes operation should return only aliases that equal the specified value. Specify CO when the ListSlotTypes operation should return aliases that contain the specified value.
integer
The maximum number of slot types to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
string
If the response from the ListSlotTypes operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
dict
Response Syntax
{ 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'slotTypeSummaries': [ { 'slotTypeId': 'string', 'slotTypeName': 'string', 'description': 'string', 'parentSlotTypeSignature': 'string', 'lastUpdatedDateTime': datetime(2015, 1, 1), 'slotTypeCategory': 'Custom'|'Extended'|'ExternalGrammar'|'Composite' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
botId (string) --
The identifier of the bot that contains the slot types.
botVersion (string) --
The version of the bot that contains the slot types.
localeId (string) --
The language and local of the slot types in the list.
slotTypeSummaries (list) --
Summary information for the slot types that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slot types available, the nextToken field contains a token to get the next page of results.
(dict) --
Provides summary information about a slot type.
slotTypeId (string) --
The unique identifier assigned to the slot type.
slotTypeName (string) --
The name of the slot type.
description (string) --
The description of the slot type.
parentSlotTypeSignature (string) --
If the slot type is derived from a built-on slot type, the name of the parent slot type.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the slot type was last updated.
slotTypeCategory (string) --
Indicates the type of the slot type.
Custom - A slot type that you created using custom values. For more information, see Creating custom slot types.
Extended - A slot type created by extending the AMAZON.AlphaNumeric built-in slot type. For more information, see AMAZON.AlphaNumeric.
ExternalGrammar - A slot type using a custom GRXML grammar to define values. For more information, see Using a custom grammar slot type.
nextToken (string) --
A token that indicates whether there are more results to return in a response to the ListSlotTypes operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListSlotTypes operation request to get the next page of results.
{'subSlotSetting': {'expression': 'string', 'slotSpecifications': {'string': {'slotTypeId': 'string', 'valueElicitationSetting': {'defaultValueSpecification': {'defaultValueList': [{'defaultValue': 'string'}]}, 'promptSpecification': {'allowInterrupt': 'boolean', 'maxRetries': 'integer', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}], 'messageSelectionStrategy': 'Random ' '| ' 'Ordered'}, 'sampleUtterances': [{'utterance': 'string'}], 'waitAndContinueSpecification': {'active': 'boolean', 'continueResponse': {'allowInterrupt': 'boolean', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}]}, 'stillWaitingResponse': {'allowInterrupt': 'boolean', 'frequencyInSeconds': 'integer', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}], 'timeoutInSeconds': 'integer'}, 'waitingResponse': {'allowInterrupt': 'boolean', 'messageGroups': [{'message': {'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}, 'variations': [{'customPayload': {'value': 'string'}, 'imageResponseCard': {'buttons': [{'text': 'string', 'value': 'string'}], 'imageUrl': 'string', 'subtitle': 'string', 'title': 'string'}, 'plainTextMessage': {'value': 'string'}, 'ssmlMessage': {'value': 'string'}}]}]}}}}}}}
Updates the settings for a slot.
See also: AWS API Documentation
Request Syntax
# This section is too large to render. # Please see the AWS API Documentation linked below.Parameters
# This section is too large to render. # Please see the AWS API Documentation linked below.
dict
Response Syntax
# This section is too large to render. # Please see the AWS API Documentation linked below.
Response Structure
# This section is too large to render. # Please see the AWS API Documentation linked below.
{'compositeSlotTypeSetting': {'subSlots': [{'name': 'string', 'slotTypeId': 'string'}]}, 'valueSelectionSetting': {'resolutionStrategy': {'Concatenation'}}}
Updates the configuration of an existing slot type.
See also: AWS API Documentation
Request Syntax
client.update_slot_type( slotTypeId='string', slotTypeName='string', description='string', slotTypeValues=[ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], valueSelectionSetting={ 'resolutionStrategy': 'OriginalValue'|'TopResolution'|'Concatenation', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, parentSlotTypeSignature='string', botId='string', botVersion='string', localeId='string', externalSourceSetting={ 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } }, compositeSlotTypeSetting={ 'subSlots': [ { 'name': 'string', 'slotTypeId': 'string' }, ] } )
string
[REQUIRED]
The unique identifier of the slot type to update.
string
[REQUIRED]
The new name of the slot type.
string
The new description of the slot type.
list
A new list of values and their optional synonyms that define the values that the slot type can take.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) -- [REQUIRED]
The value that can be used for a slot type.
dict
The strategy that Amazon Lex should use when deciding on a value from the list of slot type values.
resolutionStrategy (string) -- [REQUIRED]
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:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - 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 OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) -- [REQUIRED]
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
string
The new built-in slot type that should be used as the parent of this slot type.
string
[REQUIRED]
The identifier of the bot that contains the slot type.
string
[REQUIRED]
The version of the bot that contains the slot type. Must be DRAFT.
string
[REQUIRED]
The identifier of the language and locale that contains the slot type. The string must match one of the supported locales. For more information, see Supported languages.
dict
Provides information about the external source of the slot type's definition.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) -- [REQUIRED]
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) -- [REQUIRED]
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
dict
Specifications for a composite slot type.
subSlots (list) --
Subslots in the composite slot.
(dict) --
Subslot type composition.
name (string) -- [REQUIRED]
Name of a constituent sub slot inside a composite slot.
slotTypeId (string) -- [REQUIRED]
The unique identifier assigned to a slot type. This refers to either a built-in slot type or the unique slotTypeId of a custom slot type.
dict
Response Syntax
{ 'slotTypeId': 'string', 'slotTypeName': 'string', 'description': 'string', 'slotTypeValues': [ { 'sampleValue': { 'value': 'string' }, 'synonyms': [ { 'value': 'string' }, ] }, ], 'valueSelectionSetting': { 'resolutionStrategy': 'OriginalValue'|'TopResolution'|'Concatenation', 'regexFilter': { 'pattern': 'string' }, 'advancedRecognitionSetting': { 'audioRecognitionStrategy': 'UseSlotValuesAsCustomVocabulary' } }, 'parentSlotTypeSignature': 'string', 'botId': 'string', 'botVersion': 'string', 'localeId': 'string', 'creationDateTime': datetime(2015, 1, 1), 'lastUpdatedDateTime': datetime(2015, 1, 1), 'externalSourceSetting': { 'grammarSlotTypeSetting': { 'source': { 's3BucketName': 'string', 's3ObjectKey': 'string', 'kmsKeyArn': 'string' } } }, 'compositeSlotTypeSetting': { 'subSlots': [ { 'name': 'string', 'slotTypeId': 'string' }, ] } }
Response Structure
(dict) --
slotTypeId (string) --
The unique identifier of the updated slot type.
slotTypeName (string) --
The updated name of the slot type.
description (string) --
The updated description of the slot type.
slotTypeValues (list) --
The updated values that the slot type provides.
(dict) --
Each slot type can have a set of values. Each SlotTypeValue represents a value that the slot type can take.
sampleValue (dict) --
The value of the slot type entry.
value (string) --
The value that can be used for a slot type.
synonyms (list) --
Additional values related to the slot type entry.
(dict) --
Defines one of the values for a slot type.
value (string) --
The value that can be used for a slot type.
valueSelectionSetting (dict) --
The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
resolutionStrategy (string) --
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:
OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.
TopResolution - 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 OriginalValue.
regexFilter (dict) --
A regular expression used to validate the value of a slot.
pattern (string) --
A regular expression used to validate the value of a slot.
Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
A-Z, a-z
0-9
Unicode characters ("u<Unicode>")
Represent Unicode characters with four digits, for example "u0041" or "u005A".
The following regular expression operators are not supported:
Infinite repeaters: *, +, or {x,} with no upper bound.
Wild card (.)
advancedRecognitionSetting (dict) --
Provides settings that enable advanced recognition settings for slot values.
audioRecognitionStrategy (string) --
Enables using the slot values as a custom vocabulary for recognizing user utterances.
parentSlotTypeSignature (string) --
The updated signature of the built-in slot type that is the parent of this slot type.
botId (string) --
The identifier of the bot that contains the slot type.
botVersion (string) --
The version of the bot that contains the slot type. This is always DRAFT.
localeId (string) --
The language and locale of the updated slot type.
creationDateTime (datetime) --
The timestamp of the date and time that the slot type was created.
lastUpdatedDateTime (datetime) --
A timestamp of the date and time that the slot type was last updated.
externalSourceSetting (dict) --
Provides information about the external source of the slot type's definition.
grammarSlotTypeSetting (dict) --
Settings required for a slot type based on a grammar that you provide.
source (dict) --
The source of the grammar used to create the slot type.
s3BucketName (string) --
The name of the S3 bucket that contains the grammar source.
s3ObjectKey (string) --
The path to the grammar in the S3 bucket.
kmsKeyArn (string) --
The Amazon KMS key required to decrypt the contents of the grammar, if any.
compositeSlotTypeSetting (dict) --
Specifications for a composite slot type.
subSlots (list) --
Subslots in the composite slot.
(dict) --
Subslot type composition.
name (string) --
Name of a constituent sub slot inside a composite slot.
slotTypeId (string) --
The unique identifier assigned to a slot type. This refers to either a built-in slot type or the unique slotTypeId of a custom slot type.