libZSservicesZSamazonka-lex-modelsZSamazonka-lex-models
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

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

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

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

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

  • 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
Eq PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Read PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Show PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Generic PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Associated Types

type Rep PutSlotType :: Type -> Type #

NFData PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Methods

rnf :: PutSlotType -> () #

Hashable PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

ToJSON PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

AWSRequest PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Associated Types

type AWSResponse 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

type Rep PutSlotType Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

type AWSResponse 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:

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

Constructors

PutSlotTypeResponse' 

Fields

Instances

Instances details
Eq PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Read PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Show PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Generic PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Associated Types

type Rep PutSlotTypeResponse :: Type -> Type #

NFData PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

Methods

rnf :: PutSlotTypeResponse -> () #

type Rep PutSlotTypeResponse Source # 
Instance details

Defined in Amazonka.LexModels.PutSlotType

type Rep PutSlotTypeResponse = D1 ('MetaData "PutSlotTypeResponse" "Amazonka.LexModels.PutSlotType" "libZSservicesZSamazonka-lex-modelsZSamazonka-lex-models" 'False) (C1 ('MetaCons "PutSlotTypeResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "parentSlotTypeSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "slotTypeConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SlotTypeConfiguration])) :*: S1 ('MetaSel ('Just "checksum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "valueSelectionStrategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SlotValueSelectionStrategy)) :*: (S1 ('MetaSel ('Just "createdDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "lastUpdatedDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "createVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "enumerationValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [EnumerationValue])) :*: 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:

$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_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_enumerationValues :: Lens' PutSlotTypeResponse (Maybe [EnumerationValue]) Source #

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