Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a custom slot type or replaces an existing custom slot type.
To create a custom slot type, specify a name for the slot type and a set of enumeration values, which are the values that a slot of this type can assume. For more information, see how-it-works.
If you specify the name of an existing slot type, the fields in the
request replace the existing values in the $LATEST
version of the slot
type. Amazon Lex removes the fields that you don't provide in the
request. If you don't specify required fields, Amazon Lex throws an
exception. When you update the $LATEST
version of a slot type, if a
bot uses the $LATEST
version of an intent that contains the slot type,
the bot's status
field is set to NOT_BUILT
.
This operation requires permissions for the lex:PutSlotType
action.
Synopsis
- data PutSlotType = PutSlotType' {}
- newPutSlotType :: Text -> PutSlotType
- putSlotType_parentSlotTypeSignature :: Lens' PutSlotType (Maybe Text)
- putSlotType_slotTypeConfigurations :: Lens' PutSlotType (Maybe [SlotTypeConfiguration])
- putSlotType_checksum :: Lens' PutSlotType (Maybe Text)
- putSlotType_valueSelectionStrategy :: Lens' PutSlotType (Maybe SlotValueSelectionStrategy)
- putSlotType_createVersion :: Lens' PutSlotType (Maybe Bool)
- putSlotType_description :: Lens' PutSlotType (Maybe Text)
- putSlotType_enumerationValues :: Lens' PutSlotType (Maybe [EnumerationValue])
- putSlotType_name :: Lens' PutSlotType Text
- data PutSlotTypeResponse = PutSlotTypeResponse' {
- parentSlotTypeSignature :: Maybe Text
- slotTypeConfigurations :: Maybe [SlotTypeConfiguration]
- checksum :: Maybe Text
- valueSelectionStrategy :: Maybe SlotValueSelectionStrategy
- createdDate :: Maybe POSIX
- name :: Maybe Text
- version :: Maybe Text
- lastUpdatedDate :: Maybe POSIX
- createVersion :: Maybe Bool
- description :: Maybe Text
- enumerationValues :: Maybe [EnumerationValue]
- httpStatus :: Int
- newPutSlotTypeResponse :: Int -> PutSlotTypeResponse
- putSlotTypeResponse_parentSlotTypeSignature :: Lens' PutSlotTypeResponse (Maybe Text)
- putSlotTypeResponse_slotTypeConfigurations :: Lens' PutSlotTypeResponse (Maybe [SlotTypeConfiguration])
- putSlotTypeResponse_checksum :: Lens' PutSlotTypeResponse (Maybe Text)
- putSlotTypeResponse_valueSelectionStrategy :: Lens' PutSlotTypeResponse (Maybe SlotValueSelectionStrategy)
- putSlotTypeResponse_createdDate :: Lens' PutSlotTypeResponse (Maybe UTCTime)
- putSlotTypeResponse_name :: Lens' PutSlotTypeResponse (Maybe Text)
- putSlotTypeResponse_version :: Lens' PutSlotTypeResponse (Maybe Text)
- putSlotTypeResponse_lastUpdatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime)
- putSlotTypeResponse_createVersion :: Lens' PutSlotTypeResponse (Maybe Bool)
- putSlotTypeResponse_description :: Lens' PutSlotTypeResponse (Maybe Text)
- putSlotTypeResponse_enumerationValues :: Lens' PutSlotTypeResponse (Maybe [EnumerationValue])
- putSlotTypeResponse_httpStatus :: Lens' PutSlotTypeResponse Int
Creating a Request
data PutSlotType Source #
See: newPutSlotType
smart constructor.
PutSlotType' | |
|
Instances
Create a value of PutSlotType
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:parentSlotTypeSignature:PutSlotType'
, putSlotType_parentSlotTypeSignature
- The built-in slot type used as the parent of the slot type. When you
define a parent slot type, the new slot type has all of the same
configuration as the parent.
Only AMAZON.AlphaNumeric
is supported.
$sel:slotTypeConfigurations:PutSlotType'
, putSlotType_slotTypeConfigurations
- Configuration information that extends the parent built-in slot type.
The configuration is added to the settings for the parent slot type.
$sel:checksum:PutSlotType'
, putSlotType_checksum
- Identifies a specific revision of the $LATEST
version.
When you create a new slot type, leave the checksum
field blank. If
you specify a checksum you get a BadRequestException
exception.
When you want to update a slot type, 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.
$sel:valueSelectionStrategy:PutSlotType'
, putSlotType_valueSelectionStrategy
- 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
.
$sel:createVersion:PutSlotType'
, putSlotType_createVersion
- When set to true
a new numbered version of the slot type is created.
This is the same as calling the CreateSlotTypeVersion
operation. If
you do not specify createVersion
, the default is false
.
$sel:description:PutSlotType'
, putSlotType_description
- A description of the slot type.
$sel:enumerationValues:PutSlotType'
, putSlotType_enumerationValues
- A list of EnumerationValue
objects that defines the values that the
slot type can take. Each value can have a list of synonyms
, which are
additional values that help train the machine learning model about the
values that it resolves for a slot.
A regular expression slot type doesn't require enumeration values. All other slot types require a list of enumeration values.
When Amazon Lex resolves a slot value, it generates a resolution list
that contains up to five possible values for the slot. If you are using
a Lambda function, this resolution list is passed to the function. If
you are not using a Lambda function you can choose to return the value
that the user entered or the first value in the resolution list as the
slot value. The valueSelectionStrategy
field indicates the option to
use.
$sel:name:PutSlotType'
, putSlotType_name
- The name of the slot type. The name is not case sensitive.
The name can't match a built-in slot type name, or a built-in slot type
name with "AMAZON." removed. For example, because there is a built-in
slot type called AMAZON.DATE
, you can't create a custom slot type
called DATE
.
For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit.
Request Lenses
putSlotType_parentSlotTypeSignature :: Lens' PutSlotType (Maybe Text) Source #
The built-in slot type used as the parent of the slot type. When you define a parent slot type, the new slot type has all of the same configuration as the parent.
Only AMAZON.AlphaNumeric
is supported.
putSlotType_slotTypeConfigurations :: Lens' PutSlotType (Maybe [SlotTypeConfiguration]) Source #
Configuration information that extends the parent built-in slot type. The configuration is added to the settings for the parent slot type.
putSlotType_checksum :: Lens' PutSlotType (Maybe Text) Source #
Identifies a specific revision of the $LATEST
version.
When you create a new slot type, leave the checksum
field blank. If
you specify a checksum you get a BadRequestException
exception.
When you want to update a slot type, 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.
putSlotType_valueSelectionStrategy :: Lens' PutSlotType (Maybe SlotValueSelectionStrategy) Source #
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
.
putSlotType_createVersion :: Lens' PutSlotType (Maybe Bool) Source #
When set to true
a new numbered version of the slot type is created.
This is the same as calling the CreateSlotTypeVersion
operation. If
you do not specify createVersion
, the default is false
.
putSlotType_description :: Lens' PutSlotType (Maybe Text) Source #
A description of the slot type.
putSlotType_enumerationValues :: Lens' PutSlotType (Maybe [EnumerationValue]) Source #
A list of EnumerationValue
objects that defines the values that the
slot type can take. Each value can have a list of synonyms
, which are
additional values that help train the machine learning model about the
values that it resolves for a slot.
A regular expression slot type doesn't require enumeration values. All other slot types require a list of enumeration values.
When Amazon Lex resolves a slot value, it generates a resolution list
that contains up to five possible values for the slot. If you are using
a Lambda function, this resolution list is passed to the function. If
you are not using a Lambda function you can choose to return the value
that the user entered or the first value in the resolution list as the
slot value. The valueSelectionStrategy
field indicates the option to
use.
putSlotType_name :: Lens' PutSlotType Text Source #
The name of the slot type. The name is not case sensitive.
The name can't match a built-in slot type name, or a built-in slot type
name with "AMAZON." removed. For example, because there is a built-in
slot type called AMAZON.DATE
, you can't create a custom slot type
called DATE
.
For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit.
Destructuring the Response
data PutSlotTypeResponse Source #
See: newPutSlotTypeResponse
smart constructor.
PutSlotTypeResponse' | |
|
Instances
newPutSlotTypeResponse Source #
Create a value of PutSlotTypeResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:parentSlotTypeSignature:PutSlotType'
, putSlotTypeResponse_parentSlotTypeSignature
- The built-in slot type used as the parent of the slot type.
$sel:slotTypeConfigurations:PutSlotType'
, putSlotTypeResponse_slotTypeConfigurations
- Configuration information that extends the parent built-in slot type.
$sel:checksum:PutSlotType'
, putSlotTypeResponse_checksum
- Checksum of the $LATEST
version of the slot type.
$sel:valueSelectionStrategy:PutSlotType'
, putSlotTypeResponse_valueSelectionStrategy
- The slot resolution strategy that Amazon Lex uses to determine the value
of the slot. For more information, see PutSlotType.
$sel:createdDate:PutSlotTypeResponse'
, putSlotTypeResponse_createdDate
- The date that the slot type was created.
$sel:name:PutSlotType'
, putSlotTypeResponse_name
- The name of the slot type.
$sel:version:PutSlotTypeResponse'
, putSlotTypeResponse_version
- The version of the slot type. For a new slot type, the version is always
$LATEST
.
$sel:lastUpdatedDate:PutSlotTypeResponse'
, putSlotTypeResponse_lastUpdatedDate
- The date that the slot type was updated. When you create a slot type,
the creation date and last update date are the same.
$sel:createVersion:PutSlotType'
, putSlotTypeResponse_createVersion
- True
if a new version of the slot type was created. If the
createVersion
field was not specified in the request, the
createVersion
field is set to false in the response.
$sel:description:PutSlotType'
, putSlotTypeResponse_description
- A description of the slot type.
$sel:enumerationValues:PutSlotType'
, putSlotTypeResponse_enumerationValues
- A list of EnumerationValue
objects that defines the values that the
slot type can take.
$sel:httpStatus:PutSlotTypeResponse'
, putSlotTypeResponse_httpStatus
- The response's http status code.
Response Lenses
putSlotTypeResponse_parentSlotTypeSignature :: Lens' PutSlotTypeResponse (Maybe Text) Source #
The built-in slot type used as the parent of the slot type.
putSlotTypeResponse_slotTypeConfigurations :: Lens' PutSlotTypeResponse (Maybe [SlotTypeConfiguration]) Source #
Configuration information that extends the parent built-in slot type.
putSlotTypeResponse_checksum :: Lens' PutSlotTypeResponse (Maybe Text) Source #
Checksum of the $LATEST
version of the slot type.
putSlotTypeResponse_valueSelectionStrategy :: Lens' PutSlotTypeResponse (Maybe SlotValueSelectionStrategy) Source #
The slot resolution strategy that Amazon Lex uses to determine the value of the slot. For more information, see PutSlotType.
putSlotTypeResponse_createdDate :: Lens' PutSlotTypeResponse (Maybe UTCTime) Source #
The date that the slot type was created.
putSlotTypeResponse_name :: Lens' PutSlotTypeResponse (Maybe Text) Source #
The name of the slot type.
putSlotTypeResponse_version :: Lens' PutSlotTypeResponse (Maybe Text) Source #
The version of the slot type. For a new slot type, the version is always
$LATEST
.
putSlotTypeResponse_lastUpdatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime) Source #
The date that the slot type was updated. When you create a slot type, the creation date and last update date are the same.
putSlotTypeResponse_createVersion :: Lens' PutSlotTypeResponse (Maybe Bool) Source #
True
if a new version of the slot type was created. If the
createVersion
field was not specified in the request, the
createVersion
field is set to false in the response.
putSlotTypeResponse_description :: Lens' PutSlotTypeResponse (Maybe Text) Source #
A description of the slot type.
putSlotTypeResponse_enumerationValues :: Lens' PutSlotTypeResponse (Maybe [EnumerationValue]) Source #
A list of EnumerationValue
objects that defines the values that the
slot type can take.
putSlotTypeResponse_httpStatus :: Lens' PutSlotTypeResponse Int Source #
The response's http status code.