amazonka-lex-models-2.0: Amazon Lex Model Building Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.LexModels.PutSlotType

Description

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

Creating a Request

data PutSlotType Source #

See: newPutSlotType smart constructor.

Constructors

PutSlotType' 

Fields

  • checksum :: Maybe Text

    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.

  • createVersion :: Maybe Bool

    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.

  • description :: Maybe Text

    A description of the slot type.

  • enumerationValues :: Maybe [EnumerationValue]

    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.

  • parentSlotTypeSignature :: Maybe Text

    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.

  • slotTypeConfigurations :: Maybe [SlotTypeConfiguration]

    Configuration information that extends the parent built-in slot type. The configuration is added to the settings for the parent slot type.

  • valueSelectionStrategy :: Maybe SlotValueSelectionStrategy

    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.

  • name :: Text

    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.

Instances

Instances details
ToJSON PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

ToHeaders PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Methods

toHeaders :: PutSlotType -> [Header] #

ToPath PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

ToQuery PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

AWSRequest PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Associated Types

type AWSResponse PutSlotType #

Generic PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Associated Types

type Rep PutSlotType :: Type -> Type #

Read PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Show PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

NFData PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Methods

rnf :: PutSlotType -> () #

Eq PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Hashable PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

type AWSResponse PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

type Rep PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

newPutSlotType Source #

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:

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.

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.

PutSlotType, putSlotType_description - A description of the slot type.

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.

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.

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.

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.

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_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_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_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_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_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.

Constructors

PutSlotTypeResponse' 

Fields

Instances

Instances details
Generic PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Associated Types

type Rep PutSlotTypeResponse :: Type -> Type #

Read PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Show PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

NFData PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Methods

rnf :: PutSlotTypeResponse -> () #

Eq PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

type Rep PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

type Rep PutSlotTypeResponse = D1 ('MetaData "PutSlotTypeResponse" "Amazonka.LexModels.PutSlotType" "amazonka-lex-models-2.0-8Q1WIjnrCCIAMPuyNOCiG7" 'False) (C1 ('MetaCons "PutSlotTypeResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "checksum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "createVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "createdDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "enumerationValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [EnumerationValue])) :*: S1 ('MetaSel ('Just "lastUpdatedDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX))))) :*: ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "parentSlotTypeSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "slotTypeConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SlotTypeConfiguration])))) :*: (S1 ('MetaSel ('Just "valueSelectionStrategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SlotValueSelectionStrategy)) :*: (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))))

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:

PutSlotType, putSlotTypeResponse_checksum - Checksum of the $LATEST version of the slot type.

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.

PutSlotTypeResponse, putSlotTypeResponse_createdDate - The date that the slot type was created.

PutSlotType, putSlotTypeResponse_description - A description of the slot type.

PutSlotType, putSlotTypeResponse_enumerationValues - A list of EnumerationValue objects that defines the values that the slot type can take.

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.

PutSlotType, putSlotTypeResponse_name - The name of the slot type.

PutSlotType, putSlotTypeResponse_parentSlotTypeSignature - The built-in slot type used as the parent of the slot type.

PutSlotType, putSlotTypeResponse_slotTypeConfigurations - Configuration information that extends the parent built-in slot type.

PutSlotType, putSlotTypeResponse_valueSelectionStrategy - The slot resolution strategy that Amazon Lex uses to determine the value of the slot. For more information, see PutSlotType.

PutSlotTypeResponse, putSlotTypeResponse_version - The version of the slot type. For a new slot type, the version is always $LATEST.

$sel:httpStatus:PutSlotTypeResponse', putSlotTypeResponse_httpStatus - The response's http status code.

Response Lenses

putSlotTypeResponse_checksum :: Lens' PutSlotTypeResponse (Maybe Text) Source #

Checksum of the $LATEST version of the slot type.

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_createdDate :: Lens' PutSlotTypeResponse (Maybe UTCTime) Source #

The date that the slot type was created.

putSlotTypeResponse_enumerationValues :: Lens' PutSlotTypeResponse (Maybe [EnumerationValue]) Source #

A list of EnumerationValue objects that defines the values that the slot type can take.

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_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_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_version :: Lens' PutSlotTypeResponse (Maybe Text) Source #

The version of the slot type. For a new slot type, the version is always $LATEST.