aws-cdk-lib.aws_lex.CfnBot.SlotTypeProperty

interface SlotTypeProperty

LanguageType name
.NETAmazon.CDK.AWS.Lex.CfnBot.SlotTypeProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslex#CfnBot_SlotTypeProperty
Javasoftware.amazon.awscdk.services.lex.CfnBot.SlotTypeProperty
Pythonaws_cdk.aws_lex.CfnBot.SlotTypeProperty
TypeScript aws-cdk-lib » aws_lex » CfnBot » SlotTypeProperty

Describes a slot type.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';
const slotTypeProperty: lex.CfnBot.SlotTypeProperty = {
  name: 'name',

  // the properties below are optional
  description: 'description',
  externalSourceSetting: {
    grammarSlotTypeSetting: {
      source: {
        s3BucketName: 's3BucketName',
        s3ObjectKey: 's3ObjectKey',

        // the properties below are optional
        kmsKeyArn: 'kmsKeyArn',
      },
    },
  },
  parentSlotTypeSignature: 'parentSlotTypeSignature',
  slotTypeValues: [{
    sampleValue: {
      value: 'value',
    },

    // the properties below are optional
    synonyms: [{
      value: 'value',
    }],
  }],
  valueSelectionSetting: {
    resolutionStrategy: 'resolutionStrategy',

    // the properties below are optional
    advancedRecognitionSetting: {
      audioRecognitionStrategy: 'audioRecognitionStrategy',
    },
    regexFilter: {
      pattern: 'pattern',
    },
  },
};

Properties

NameTypeDescription
namestringThe name of the slot type.
description?stringA description of the slot type.
externalSourceSetting?IResolvable | ExternalSourceSettingPropertySets the type of external information used to create the slot type.
parentSlotTypeSignature?stringThe built-in slot type used as a parent of this slot type.
slotTypeValues?IResolvable | IResolvable | SlotTypeValueProperty[]A list of SlotTypeValue objects that defines the values that the slot type can take.
valueSelectionSetting?IResolvable | SlotValueSelectionSettingPropertyDetermines the slot resolution strategy that Amazon Lex uses to return slot type values.

name

Type: string

The name of the slot type.

A slot type name must be unique withing the account.


description?

Type: string (optional)

A description of the slot type.

Use the description to help identify the slot type in lists.


externalSourceSetting?

Type: IResolvable | ExternalSourceSettingProperty (optional)

Sets the type of external information used to create the slot type.


parentSlotTypeSignature?

Type: string (optional)

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 lot type.

Only AMAZON.AlphaNumeric is supported.


slotTypeValues?

Type: IResolvable | IResolvable | SlotTypeValueProperty[] (optional)

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 the slot.


valueSelectionSetting?

Type: IResolvable | SlotValueSelectionSettingProperty (optional)

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 .