Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
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
- putSlotType :: Text -> PutSlotType
- data PutSlotType
- pstChecksum :: Lens' PutSlotType (Maybe Text)
- pstValueSelectionStrategy :: Lens' PutSlotType (Maybe SlotValueSelectionStrategy)
- pstCreateVersion :: Lens' PutSlotType (Maybe Bool)
- pstDescription :: Lens' PutSlotType (Maybe Text)
- pstEnumerationValues :: Lens' PutSlotType (Maybe (NonEmpty EnumerationValue))
- pstName :: Lens' PutSlotType Text
- putSlotTypeResponse :: Int -> PutSlotTypeResponse
- data PutSlotTypeResponse
- pstrsChecksum :: Lens' PutSlotTypeResponse (Maybe Text)
- pstrsValueSelectionStrategy :: Lens' PutSlotTypeResponse (Maybe SlotValueSelectionStrategy)
- pstrsCreatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime)
- pstrsName :: Lens' PutSlotTypeResponse (Maybe Text)
- pstrsVersion :: Lens' PutSlotTypeResponse (Maybe Text)
- pstrsLastUpdatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime)
- pstrsCreateVersion :: Lens' PutSlotTypeResponse (Maybe Bool)
- pstrsDescription :: Lens' PutSlotTypeResponse (Maybe Text)
- pstrsEnumerationValues :: Lens' PutSlotTypeResponse (Maybe (NonEmpty EnumerationValue))
- pstrsResponseStatus :: Lens' PutSlotTypeResponse Int
Creating a Request
:: Text | |
-> PutSlotType |
Creates a value of PutSlotType
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
pstChecksum
- Identifies a specific revision of the> LATEST
version. When you create a new slot type, leave thechecksum
field blank. If you specify a checksum you get aBadRequestException
exception. When you want to update a slot type, set thechecksum
field to the checksum of the most recent revision of the> LATEST
version. If you don't specify thechecksum
field, or if the checksum does not match the> LATEST
version, you get aPreconditionFailedException
exception.pstValueSelectionStrategy
- 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 thevalueSelectionStrategy
, the default isORIGINAL_VALUE
.pstCreateVersion
- Undocumented member.pstDescription
- A description of the slot type.pstEnumerationValues
- A list ofEnumerationValue
objects that defines the values that the slot type can take. Each value can have a list ofsynonyms
, which are additional values that help train the machine learning model about the values that it resolves for a slot. 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. ThevalueSelectionStrategy
field indicates the option to use.pstName
- 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 calledAMAZON.DATE
, you can't create a custom slot type calledDATE
. For a list of built-in slot types, see Slot Type Reference in the Alexa Skills Kit .
data PutSlotType Source #
See: putSlotType
smart constructor.
Instances
Request Lenses
pstChecksum :: 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.
pstValueSelectionStrategy :: 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
.
pstCreateVersion :: Lens' PutSlotType (Maybe Bool) Source #
Undocumented member.
pstDescription :: Lens' PutSlotType (Maybe Text) Source #
A description of the slot type.
pstEnumerationValues :: Lens' PutSlotType (Maybe (NonEmpty 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. 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.
pstName :: 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
Creates a value of PutSlotTypeResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
pstrsChecksum
- Checksum of the> LATEST
version of the slot type.pstrsValueSelectionStrategy
- The slot resolution strategy that Amazon Lex uses to determine the value of the slot. For more information, seePutSlotType
.pstrsCreatedDate
- The date that the slot type was created.pstrsName
- The name of the slot type.pstrsVersion
- The version of the slot type. For a new slot type, the version is always> LATEST
.pstrsLastUpdatedDate
- The date that the slot type was updated. When you create a slot type, the creation date and last update date are the same.pstrsCreateVersion
- Undocumented member.pstrsDescription
- A description of the slot type.pstrsEnumerationValues
- A list ofEnumerationValue
objects that defines the values that the slot type can take.pstrsResponseStatus
- -- | The response status code.
data PutSlotTypeResponse Source #
See: putSlotTypeResponse
smart constructor.
Instances
Response Lenses
pstrsChecksum :: Lens' PutSlotTypeResponse (Maybe Text) Source #
Checksum of the > LATEST
version of the slot type.
pstrsValueSelectionStrategy :: 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
.
pstrsCreatedDate :: Lens' PutSlotTypeResponse (Maybe UTCTime) Source #
The date that the slot type was created.
pstrsVersion :: Lens' PutSlotTypeResponse (Maybe Text) Source #
The version of the slot type. For a new slot type, the version is always > LATEST
.
pstrsLastUpdatedDate :: 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.
pstrsCreateVersion :: Lens' PutSlotTypeResponse (Maybe Bool) Source #
Undocumented member.
pstrsDescription :: Lens' PutSlotTypeResponse (Maybe Text) Source #
A description of the slot type.
pstrsEnumerationValues :: Lens' PutSlotTypeResponse (Maybe (NonEmpty EnumerationValue)) Source #
A list of EnumerationValue
objects that defines the values that the slot type can take.
pstrsResponseStatus :: Lens' PutSlotTypeResponse Int Source #
- - | The response status code.